summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Assistant/Threads/TransferScanner.hs8
-rw-r--r--doc/design/assistant/webapp.mdwn2
2 files changed, 6 insertions, 4 deletions
diff --git a/Assistant/Threads/TransferScanner.hs b/Assistant/Threads/TransferScanner.hs
index 56ba63ff1..8f44f24d1 100644
--- a/Assistant/Threads/TransferScanner.hs
+++ b/Assistant/Threads/TransferScanner.hs
@@ -87,7 +87,7 @@ failedTransferScan st dstatus transferqueue r = do
transferqueue dstatus (associatedFile info) t r
{- This is a expensive scan through the full git work tree, finding
- - files to download from or upload to any of the remotes.
+ - files to download from or upload to any known remote.
-
- The scan is blocked when the transfer queue gets too large. -}
expensiveScan :: ThreadState -> DaemonStatusHandle -> TransferQueue -> [Remote] -> IO ()
@@ -114,7 +114,11 @@ expensiveScan st dstatus transferqueue rs = unless onlyweb $ do
queueTransferWhenSmall transferqueue dstatus (Just f) t r
findtransfers f (key, _) = do
locs <- loggedLocations key
- let use a = return $ catMaybes $ map (a key locs) rs
+ {- Queue transfers from any known remote. The known
+ - remotes may have changed since this scan began. -}
+ let use a = do
+ knownrs <- liftIO $ knownRemotes <$> getDaemonStatus dstatus
+ return $ catMaybes $ map (a key locs) knownrs
ifM (inAnnex key)
( filterM (wantSend (Just f) . Remote.uuid . fst)
=<< use (check Upload False)
diff --git a/doc/design/assistant/webapp.mdwn b/doc/design/assistant/webapp.mdwn
index f3d959a33..106e7b1f6 100644
--- a/doc/design/assistant/webapp.mdwn
+++ b/doc/design/assistant/webapp.mdwn
@@ -8,8 +8,6 @@ The webapp is a web server that displays a shiny interface.
This is quite likely because of how the div containing transfers is refereshed.
If instead javascript was used to update the progress bar etc for transfers
with json data, the buttons would work better.
-* Disabling syncing to a remote doesn't stop any running transfer scan,
- which can still queue uploads or downloads to the remote.
* Transfers from a remote with syncing disabled show as from "unknown".
(Note that it's probably not practical to prevent a remote with syncing
disabled from initiating transfers, so this can happen.)