mirror of
https://github.com/aelve/guide.git
synced 2024-12-23 12:52:31 +03:00
Create checkpoints once in 6h, not once in 1h
This commit is contained in:
parent
a6292ef064
commit
b123a7df07
@ -124,7 +124,7 @@ git push
|
||||
|
||||
$ chmod +x upload.sh
|
||||
|
||||
Finally, make a cron job that would try to upload new data every 10m (tho the actual checkpoints are only created once per hour):
|
||||
Finally, make a cron job that would try to upload new data every 10m (tho the actual checkpoints are only created once per six hours):
|
||||
|
||||
$ crontab -e
|
||||
|
||||
|
@ -647,12 +647,12 @@ main = do
|
||||
mapM_ killThread =<< readIORef ekgId
|
||||
bracket prepare finalise $ \db -> do
|
||||
hSetBuffering stdout NoBuffering
|
||||
-- Create a checkpoint every hour. Note: if nothing was changed,
|
||||
-- Create a checkpoint every six hours. Note: if nothing was changed,
|
||||
-- acid-state overwrites the previous checkpoint, which saves us some
|
||||
-- space.
|
||||
forkOS $ forever $ do
|
||||
createCheckpoint db
|
||||
threadDelay (1000000 * 3600)
|
||||
threadDelay (1000000 * 3600 * 6)
|
||||
-- EKG metrics
|
||||
ekg <- EKG.forkServer "localhost" 5050
|
||||
writeIORef ekgId (Just (EKG.serverThreadId ekg))
|
||||
|
Loading…
Reference in New Issue
Block a user