run full transfer scan on all remotes at startup
Or when a remote first becomes available after startup.
This commit is contained in:
parent
9fafddc7eb
commit
e58d19b533
3 changed files with 39 additions and 17 deletions
|
@ -41,9 +41,9 @@ getScanRemote v = atomically $ do
|
|||
return ret
|
||||
|
||||
{- Adds new remotes that need scanning to the map. -}
|
||||
addScanRemotes :: ScanRemoteMap -> [Remote] -> Bool -> IO ()
|
||||
addScanRemotes _ [] _ = noop
|
||||
addScanRemotes v rs full = atomically $ do
|
||||
addScanRemotes :: ScanRemoteMap -> Bool -> [Remote] -> IO ()
|
||||
addScanRemotes _ _ [] = noop
|
||||
addScanRemotes v full rs = atomically $ do
|
||||
m <- fromMaybe M.empty <$> tryTakeTMVar v
|
||||
putTMVar v $ M.unionWith merge (M.fromList $ zip rs (map info rs)) m
|
||||
where
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue