aboutsummaryrefslogtreecommitdiff
path: root/Assistant/TransferQueue.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-03-13 13:05:30 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-03-13 13:11:49 -0400
commit3dde2f75fa5bcaf8a92665bd20936837fe02a931 (patch)
tree64d41a09af40774d729b1ce54c6eb0dc68c809df /Assistant/TransferQueue.hs
parentd1b3a58ac750578d4c8986dead4bcd6a137fc023 (diff)
tweak
Diffstat (limited to 'Assistant/TransferQueue.hs')
-rw-r--r--Assistant/TransferQueue.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Assistant/TransferQueue.hs b/Assistant/TransferQueue.hs
index bf2f5f03b..5974c70d1 100644
--- a/Assistant/TransferQueue.hs
+++ b/Assistant/TransferQueue.hs
@@ -58,14 +58,14 @@ queueTransfersMatching matching reason schedule k f direction
| otherwise = go
where
go = do
- rs <- liftAnnex . sufficientremotes
+ rs <- liftAnnex . selectremotes
=<< syncDataRemotes <$> getDaemonStatus
let matchingrs = filter (matching . Remote.uuid) rs
if null matchingrs
then defer
else forM_ matchingrs $ \r ->
enqueue reason schedule (gentransfer r) (stubInfo f r)
- sufficientremotes rs
+ selectremotes rs
{- Queue downloads from all remotes that
- have the key, with the cheapest ones first.
- More expensive ones will only be tried if
@@ -107,7 +107,8 @@ queueDeferredDownloads reason schedule = do
let sources = filter (\r -> uuid r `elem` uuids) rs
unless (null sources) $
forM_ sources $ \r ->
- enqueue reason schedule (gentransfer r) (stubInfo f r)
+ enqueue reason schedule
+ (gentransfer r) (stubInfo f r)
return $ null sources
where
gentransfer r = Transfer