diff options
author | Ben Sima <ben@bsima.me> | 2021-02-22 20:35:20 -0500 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2021-02-22 20:35:20 -0500 |
commit | ccc4878b1b9e27e9a7763bea22977d4d055c21cc (patch) | |
tree | 868eb809342a9f37bd2b9ea5d2202b724470affb | |
parent | a6eb0f4ad04648fc7cefd9777eeceec5ad156c38 (diff) |
Keep a checkpoint on shutdown
-rw-r--r-- | Biz/Devalloc.hs | 3 |
1 files changed, 2 insertions, 1 deletions
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 |