diff options
Diffstat (limited to 'Assistant/Threads')
-rw-r--r-- | Assistant/Threads/Pusher.hs | 4 | ||||
-rw-r--r-- | Assistant/Threads/TransferScanner.hs | 17 | ||||
-rw-r--r-- | Assistant/Threads/XMPPClient.hs | 2 |
3 files changed, 9 insertions, 14 deletions
diff --git a/Assistant/Threads/Pusher.hs b/Assistant/Threads/Pusher.hs index d87aa8d3b..e90cca1ec 100644 --- a/Assistant/Threads/Pusher.hs +++ b/Assistant/Threads/Pusher.hs @@ -11,7 +11,6 @@ import Assistant.Common import Assistant.Commits import Assistant.Types.Commits import Assistant.Pushes -import Assistant.Alert import Assistant.DaemonStatus import Assistant.Sync import Utility.ThreadScheduler @@ -25,8 +24,7 @@ pushRetryThread = namedThread "PushRetrier" $ runEvery (Seconds halfhour) <~> do topush <- getFailedPushesBefore (fromIntegral halfhour) unless (null topush) $ do debug ["retrying", show (length topush), "failed pushes"] - void $ alertWhile (pushRetryAlert topush) $ - pushToRemotes True topush + void $ pushToRemotes True topush where halfhour = 1800 diff --git a/Assistant/Threads/TransferScanner.hs b/Assistant/Threads/TransferScanner.hs index d4ccf411a..d328ba197 100644 --- a/Assistant/Threads/TransferScanner.hs +++ b/Assistant/Threads/TransferScanner.hs @@ -12,7 +12,6 @@ import Assistant.Types.ScanRemotes import Assistant.ScanRemotes import Assistant.TransferQueue import Assistant.DaemonStatus -import Assistant.Alert import Assistant.Drop import Assistant.Sync import Logs.Transfer @@ -100,15 +99,13 @@ failedTransferScan r = do expensiveScan :: [Remote] -> Assistant () expensiveScan rs = unless onlyweb $ do debug ["starting scan of", show visiblers] - void $ alertWhile (scanAlert visiblers) $ do - g <- liftAnnex gitRepo - (files, cleanup) <- liftIO $ LsFiles.inRepo [] g - forM_ files $ \f -> do - ts <- maybe (return []) (findtransfers f) - =<< liftAnnex (Backend.lookupFile f) - mapM_ (enqueue f) ts - void $ liftIO cleanup - return True + g <- liftAnnex gitRepo + (files, cleanup) <- liftIO $ LsFiles.inRepo [] g + forM_ files $ \f -> do + ts <- maybe (return []) (findtransfers f) + =<< liftAnnex (Backend.lookupFile f) + mapM_ (enqueue f) ts + void $ liftIO cleanup debug ["finished scan of", show visiblers] where onlyweb = all (== webUUID) $ map Remote.uuid rs diff --git a/Assistant/Threads/XMPPClient.hs b/Assistant/Threads/XMPPClient.hs index 79bb33b0e..1242c1d74 100644 --- a/Assistant/Threads/XMPPClient.hs +++ b/Assistant/Threads/XMPPClient.hs @@ -256,7 +256,7 @@ pull us = do pullone [] _ = noop pullone (r:rs) branch = - unlessM (all id . fst <$> manualPull branch [r]) $ + unlessM (null . fst <$> manualPull branch [r]) $ pullone rs branch pairMsgReceived :: UrlRenderer -> PairStage -> UUID -> JID -> JID -> Assistant () |