add globallyAvailable to remotes

This commit is contained in:
Joey Hess 2013-03-15 19:16:13 -04:00
parent 57e5960758
commit 449520a573
12 changed files with 23 additions and 4 deletions

View file

@ -53,15 +53,18 @@ calcSyncRemotes = do
let good r = Remote.uuid r `elem` alive
let syncable = filter good rs
let nonxmpp = filter (not . isXMPPRemote) syncable
liftIO $ print (nonxmpp, map Remote.globallyAvailable nonxmpp)
return $ \dstatus -> dstatus
{ syncRemotes = syncable
, syncGitRemotes =
filter (not . Remote.specialRemote) syncable
, syncDataRemotes = nonxmpp
, syncingToCloudRemote =
any (Git.repoIsUrl . Remote.repo) nonxmpp
, syncingToCloudRemote = any iscloud nonxmpp
}
where
iscloud r = not (Remote.readonly r) && Remote.globallyAvailable r
{- Updates the sycRemotes list from the list of all remotes in Annex state. -}
updateSyncRemotes :: Assistant ()
@ -69,6 +72,7 @@ updateSyncRemotes = do
modifyDaemonStatus_ =<< liftAnnex calcSyncRemotes
status <- getDaemonStatus
liftIO $ sendNotification $ syncRemotesNotifier status
when (syncingToCloudRemote status) $
updateAlertMap $
M.filter $ \alert ->