git: latest checkpoint output

This commit is contained in:
voidlizard 2025-02-13 15:26:11 +03:00
parent 768a8181e7
commit 695f271cf8
1 changed files with 4 additions and 1 deletions

View File

@ -182,7 +182,10 @@ main = flip runContT pure do
case what of
[ListVal [SymbolVal "checkpoint", TextLike w, LitIntVal r]] -> do
atomically $ writeTVar cp_ (Just (w,r))
atomically do
ts0 <- readTVar cp_ <&> fmap snd
when (Just r > ts0) do
writeTVar cp_ (Just (w,r))
[ListVal [SymbolVal "status", TextLike "FLUSH"]] -> do
finished ()