summaryrefslogtreecommitdiff
path: root/Assistant/Threads
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-10-29 19:14:30 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-10-29 19:14:30 -0400
commitcb504374b53a940ea12feeb5ba91dd78466be455 (patch)
treea9e954e85c333a494016df935f32f13aeb38c02f /Assistant/Threads
parent86b3857a4c1edafef817935ad3c5d63e6d2d3b25 (diff)
split ScanRemotes and lifted
Diffstat (limited to 'Assistant/Threads')
-rw-r--r--Assistant/Threads/TransferScanner.hs8
1 files changed, 3 insertions, 5 deletions
diff --git a/Assistant/Threads/TransferScanner.hs b/Assistant/Threads/TransferScanner.hs
index 3e99b60f5..ec0bc0d9b 100644
--- a/Assistant/Threads/TransferScanner.hs
+++ b/Assistant/Threads/TransferScanner.hs
@@ -8,6 +8,7 @@
module Assistant.Threads.TransferScanner where
import Assistant.Common
+import Assistant.Types.ScanRemotes
import Assistant.ScanRemotes
import Assistant.TransferQueue
import Assistant.DaemonStatus
@@ -36,7 +37,7 @@ transferScannerThread = NamedThread "TransferScanner" $ do
where
go scanned = do
liftIO $ threadDelaySeconds (Seconds 2)
- (rs, infos) <- unzip <$> getScanRemote <<~ scanRemoteMap
+ (rs, infos) <- unzip <$> getScanRemote
if any fullScan infos || any (`S.notMember` scanned) rs
then do
expensiveScan rs
@@ -56,10 +57,7 @@ transferScannerThread = NamedThread "TransferScanner" $ do
- and then the system (or us) crashed, and that info was
- lost.
-}
- startupScan = do
- scanremotes <- getAssistant scanRemoteMap
- liftIO . addScanRemotes scanremotes True
- =<< syncRemotes <$> daemonStatus
+ startupScan = addScanRemotes True =<< syncRemotes <$> daemonStatus
{- This is a cheap scan for failed transfers involving a remote. -}
failedTransferScan :: Remote -> Assistant ()