diff --git a/app/Janitor.hs b/app/Janitor.hs new file mode 100644 index 0000000..ca5ae2c --- /dev/null +++ b/app/Janitor.hs @@ -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)) diff --git a/mateamt.cabal b/mateamt.cabal index 8f06067..7c275c3 100644 --- a/mateamt.cabal +++ b/mateamt.cabal @@ -24,6 +24,7 @@ executable mateamt main-is: Main.hs other-modules: AppTypes , AppTypes.Configuration + , Janitor -- other-extensions: build-depends: base ^>=4.12.0.0 , mateamt