Remove waiting for refchan on run directory as it fails on freshly created sync

This commit is contained in:
b0oh 2025-03-29 10:41:39 +07:00 committed by Dmitry Zuykov
parent c1caa97b0e
commit cecd905071
2 changed files with 3 additions and 6 deletions

View File

@ -242,11 +242,11 @@ hbs2-sync init --refchan 94GF31TtD38yWG6iZLRy1xZBb1dxcAC7BRBJTMyAq8VF
refchan <- refchan <-
view dirSyncRefChan env view dirSyncRefChan env
& orThrowUser "refchan not found" & orThrowUser "refchan not found"
state <- getStateFromRefChan refchan state <- getStateFromRefChan refchan
let tombs = filter (isTomb . snd) state let tombs = filter (isTomb . snd) state
for_ tombs $ \(path, entry) -> do for_ tombs $ \(path, entry) -> do
when (isTomb entry) do when (isTomb entry) do
liftIO $ putStrLn path liftIO $ putStrLn path
@ -258,7 +258,7 @@ hbs2-sync init --refchan 94GF31TtD38yWG6iZLRy1xZBb1dxcAC7BRBJTMyAq8VF
refchan <- refchan <-
view dirSyncRefChan env view dirSyncRefChan env
& orThrowUser "refchan not found" & orThrowUser "refchan not found"
accepted <- getAccepted refchan <&> L.sortOn getEntryTimestamp accepted <- getAccepted refchan <&> L.sortOn getEntryTimestamp

View File

@ -776,9 +776,6 @@ runDirectory = do
refchan <- view dirSyncRefChan env & orThrow RefChanNotSetException refchan <- view dirSyncRefChan env & orThrow RefChanNotSetException
waitForRefchan refchan (TimeoutMin 1)
>>= orThrow RefChanHeadNotFoundException
-- FIXME: multiple-directory-scans -- FIXME: multiple-directory-scans
local <- getStateFromDir0 True local <- getStateFromDir0 True