This commit is contained in:
voidlizard 2025-01-20 15:44:07 +03:00
parent 99c9168fb6
commit f50311bd03
2 changed files with 13 additions and 3 deletions

View File

@ -112,7 +112,15 @@ localDict DeferredOps{..} = makeDict @C do
debug $ red "REFLOG" <+> pretty (AsBase58 reflog)
importGitRefLog
t0 <- getTimeCoarse
flip fix 0 $ \next i -> do
importGitRefLog >>= \case
Just{} -> none
Nothing -> do
notice "wait for data..."
pause @'Seconds 2.0
next (succ i)
rrefs <- importedRefs

View File

@ -112,7 +112,7 @@ importGitRefLog :: forall m . ( HBS2GitPerks m
, HasGitRemoteKey m
, MonadReader Git3Env m
)
=> m ()
=> m (Maybe HashRef)
importGitRefLog = do
@ -145,7 +145,7 @@ importGitRefLog = do
else do
next (xs, l)
void $ runMaybeT do
runMaybeT do
cp <- toMPlus cp'
notice $ "found checkpoint" <+> pretty cp
txs <- lift $ txList ( pure . not . flip HS.member excl ) (Just cp)
@ -164,3 +164,5 @@ importGitRefLog = do
updateImportedCheckpoint cp
pure cp