From ccc4878b1b9e27e9a7763bea22977d4d055c21cc Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 22 Feb 2021 20:35:20 -0500 Subject: Keep a checkpoint on shutdown --- Biz/Devalloc.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Biz/Devalloc.hs b/Biz/Devalloc.hs index 0442ae2..842cf24 100644 --- a/Biz/Devalloc.hs +++ b/Biz/Devalloc.hs @@ -75,6 +75,7 @@ import Crypto.JOSE.JWK (JWK) import Data.Acid (makeAcidic) import qualified Data.Acid as Acid import qualified Data.Acid.Advanced as Acid +import qualified Data.Acid.Local as Acid import qualified Data.Aeson as Aeson import qualified Data.ByteString.Lazy as LBS import Data.Data (Data, Typeable) @@ -471,7 +472,7 @@ startup quiet = do pure (cfg, app, kp) shutdown :: (Config, Application, Acid.AcidState Keep) -> IO () -shutdown (_, _, kp) = Acid.closeAcidState kp +shutdown (_, _, kp) = Acid.createCheckpointAndClose kp tidy :: Config -> IO () tidy Config {..} = Directory.removeDirectoryRecursive keep -- cgit v1.2.3