summaryrefslogtreecommitdiff
path: root/Assistant/DaemonStatus.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-08-26 14:56:26 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-08-26 14:56:56 -0400
commit4d269db5208dca3ce043e716d05a1c7bcc7a6755 (patch)
treead45f6aa3aa777472d02ebbcfec268350053da48 /Assistant/DaemonStatus.hs
parentc58d5532651f78e8bf0266b818d5480d282b26e6 (diff)
don't exclude special remotes from the knownRemotes list used by the assistant
But do exclude them when pushing out changes.
Diffstat (limited to 'Assistant/DaemonStatus.hs')
-rw-r--r--Assistant/DaemonStatus.hs9
1 files changed, 6 insertions, 3 deletions
diff --git a/Assistant/DaemonStatus.hs b/Assistant/DaemonStatus.hs
index 4a9dfb4e2..4077eec88 100644
--- a/Assistant/DaemonStatus.hs
+++ b/Assistant/DaemonStatus.hs
@@ -14,7 +14,7 @@ import Utility.ThreadScheduler
import Utility.TempFile
import Utility.NotificationBroadcaster
import Logs.Transfer
-import qualified Command.Sync
+import qualified Remote
import Control.Concurrent.STM
import System.Posix.Types
@@ -81,11 +81,14 @@ modifyDaemonStatus dstatus a = do
sendNotification $ changeNotifier s
return b
+calcKnownRemotes :: Annex [Remote]
+calcKnownRemotes = concat . Remote.byCost <$> Remote.enabledRemoteList
+
{- Updates the cached ordered list of remotes from the list in Annex
- state. -}
updateKnownRemotes :: DaemonStatusHandle -> Annex ()
updateKnownRemotes dstatus = do
- remotes <- Command.Sync.syncRemotes []
+ remotes <- calcKnownRemotes
liftIO $ modifyDaemonStatus_ dstatus $
\s -> s { knownRemotes = remotes }
@@ -97,7 +100,7 @@ startDaemonStatus = do
status <- liftIO $
catchDefaultIO (readDaemonStatusFile file) =<< newDaemonStatus
transfers <- M.fromList <$> getTransfers
- remotes <- Command.Sync.syncRemotes []
+ remotes <- calcKnownRemotes
liftIO $ atomically $ newTMVar status
{ scanComplete = False
, sanityCheckRunning = False