automatic repolist updating

This commit is contained in:
Joey Hess 2012-11-13 17:50:54 -04:00
parent b7af4438f8
commit d468e37f46
14 changed files with 135 additions and 70 deletions

View file

@ -44,6 +44,7 @@ modifyDaemonStatus a = do
sendNotification $ changeNotifier s
return b
{- Returns a function that updates the lists of syncable remotes. -}
calcSyncRemotes :: Annex (DaemonStatus -> DaemonStatus)
calcSyncRemotes = do
@ -60,7 +61,9 @@ calcSyncRemotes = do
{- Updates the sycRemotes list from the list of all remotes in Annex state. -}
updateSyncRemotes :: Assistant ()
updateSyncRemotes = modifyDaemonStatus_ =<< liftAnnex calcSyncRemotes
updateSyncRemotes = do
modifyDaemonStatus_ =<< liftAnnex calcSyncRemotes
liftIO . sendNotification =<< syncRemotesNotifier <$> getDaemonStatus
{- Load any previous daemon status file, and store it in a MVar for this
- process to use as its DaemonStatus. Also gets current transfer status. -}