I'm scruffy. The janitor.

This commit is contained in:
nek0 2019-10-28 05:47:25 +01:00
parent 0630b5961e
commit 0252d67d83
2 changed files with 17 additions and 0 deletions

16
app/Janitor.hs Normal file
View file

@ -0,0 +1,16 @@
{-# LANGUAGE OverloadedStrings #-}
module Janitor where
import qualified Data.Set as S
forkCleanProcess :: IO ()
forkCleanProcess =
return()
cleanProcess conn store =
return ()
cleanStore store =
now <- getCurrentTime
atomically $
modifyTVar store (S.filter (\(Ticket _ _ exp _) -> exp >= now))

View file

@ -24,6 +24,7 @@ executable mateamt
main-is: Main.hs main-is: Main.hs
other-modules: AppTypes other-modules: AppTypes
, AppTypes.Configuration , AppTypes.Configuration
, Janitor
-- other-extensions: -- other-extensions:
build-depends: base ^>=4.12.0.0 build-depends: base ^>=4.12.0.0
, mateamt , mateamt