diff options
Diffstat (limited to 'Assistant/Threads')
-rw-r--r-- | Assistant/Threads/Committer.hs | 6 | ||||
-rw-r--r-- | Assistant/Threads/Cronner.hs | 8 | ||||
-rw-r--r-- | Assistant/Threads/SanityChecker.hs | 2 | ||||
-rw-r--r-- | Assistant/Threads/UpgradeWatcher.hs | 4 | ||||
-rw-r--r-- | Assistant/Threads/Upgrader.hs | 2 | ||||
-rw-r--r-- | Assistant/Threads/Watcher.hs | 6 | ||||
-rw-r--r-- | Assistant/Threads/WebApp.hs | 2 | ||||
-rw-r--r-- | Assistant/Threads/XMPPClient.hs | 2 | ||||
-rw-r--r-- | Assistant/Threads/XMPPPusher.hs | 4 |
9 files changed, 18 insertions, 18 deletions
diff --git a/Assistant/Threads/Committer.hs b/Assistant/Threads/Committer.hs index 4a47a9e2c..47c2aa4aa 100644 --- a/Assistant/Threads/Committer.hs +++ b/Assistant/Threads/Committer.hs @@ -164,8 +164,8 @@ waitChangeTime a = waitchanges 0 -} aftermaxcommit oldchanges = loop (30 :: Int) where - loop 0 = continue oldchanges - loop n = do + loop 0 = continue oldchanges + loop n = do liftAnnex noop -- ensure Annex state is free liftIO $ threadDelaySeconds (Seconds 1) changes <- getAnyChanges @@ -301,7 +301,7 @@ handleAdds havelsof delayadd cs = returnWhen (null incomplete) $ do add change@(InProcessAddChange { keySource = ks }) = catchDefaultIO Nothing <~> doadd where - doadd = sanitycheck ks $ do + doadd = sanitycheck ks $ do (mkey, mcache) <- liftAnnex $ do showStart "add" $ keyFilename ks Command.Add.ingest $ Just ks diff --git a/Assistant/Threads/Cronner.hs b/Assistant/Threads/Cronner.hs index 0fe7f58f4..6dc6f4c6b 100644 --- a/Assistant/Threads/Cronner.hs +++ b/Assistant/Threads/Cronner.hs @@ -87,7 +87,7 @@ cronnerThread urlrenderer = namedThreadUnchecked "Cronner" $ do liftIO $ waitNotification h debug ["reloading changed activities"] go h amap' nmap' - startactivities as lastruntimes = forM as $ \activity -> + startactivities as lastruntimes = forM as $ \activity -> case connectActivityUUID activity of Nothing -> do runner <- asIO2 (sleepingActivityThread urlrenderer) @@ -108,8 +108,8 @@ cronnerThread urlrenderer = namedThreadUnchecked "Cronner" $ do sleepingActivityThread :: UrlRenderer -> ScheduledActivity -> Maybe LocalTime -> Assistant () sleepingActivityThread urlrenderer activity lasttime = go lasttime =<< getnexttime lasttime where - getnexttime = liftIO . nextTime schedule - go _ Nothing = debug ["no scheduled events left for", desc] + getnexttime = liftIO . nextTime schedule + go _ Nothing = debug ["no scheduled events left for", desc] go l (Just (NextTimeExactly t)) = waitrun l t Nothing go l (Just (NextTimeWindow windowstart windowend)) = waitrun l windowstart (Just windowend) @@ -129,7 +129,7 @@ sleepingActivityThread urlrenderer activity lasttime = go lasttime =<< getnextti go l =<< getnexttime l else run nowt where - tolate nowt tz = case mmaxt of + tolate nowt tz = case mmaxt of Just maxt -> nowt > maxt -- allow the job to start 10 minutes late Nothing ->diffUTCTime diff --git a/Assistant/Threads/SanityChecker.hs b/Assistant/Threads/SanityChecker.hs index 3371f212f..9fd963a69 100644 --- a/Assistant/Threads/SanityChecker.hs +++ b/Assistant/Threads/SanityChecker.hs @@ -258,7 +258,7 @@ checkOldUnused :: UrlRenderer -> Assistant () checkOldUnused urlrenderer = go =<< annexExpireUnused <$> liftAnnex Annex.getGitConfig where go (Just Nothing) = noop - go (Just (Just expireunused)) = expireUnused (Just expireunused) + go (Just (Just expireunused)) = expireUnused (Just expireunused) go Nothing = maybe noop prompt =<< describeUnusedWhenBig prompt msg = diff --git a/Assistant/Threads/UpgradeWatcher.hs b/Assistant/Threads/UpgradeWatcher.hs index ffad09d3d..431e6f339 100644 --- a/Assistant/Threads/UpgradeWatcher.hs +++ b/Assistant/Threads/UpgradeWatcher.hs @@ -51,9 +51,9 @@ upgradeWatcherThread urlrenderer = namedThread "UpgradeWatcher" $ do let depth = length (splitPath dir) + 1 let nosubdirs f = length (splitPath f) == depth void $ liftIO $ watchDir dir nosubdirs False hooks (startup mvar) - -- Ignore bogus events generated during the startup scan. + -- Ignore bogus events generated during the startup scan. -- We ask the watcher to not generate them, but just to be safe.. - startup mvar scanner = do + startup mvar scanner = do r <- scanner void $ swapMVar mvar Started return r diff --git a/Assistant/Threads/Upgrader.hs b/Assistant/Threads/Upgrader.hs index 637c82a7d..100c15414 100644 --- a/Assistant/Threads/Upgrader.hs +++ b/Assistant/Threads/Upgrader.hs @@ -39,7 +39,7 @@ upgraderThread urlrenderer = namedThread "Upgrader" $ h <- liftIO . newNotificationHandle False . networkConnectedNotifier =<< getDaemonStatus go h =<< liftIO getCurrentTime where - {- Wait for a network connection event. Then see if it's been + {- Wait for a network connection event. Then see if it's been - half a day since the last upgrade check. If so, proceed with - check. -} go h lastchecked = do diff --git a/Assistant/Threads/Watcher.hs b/Assistant/Threads/Watcher.hs index fe9a95471..8482de895 100644 --- a/Assistant/Threads/Watcher.hs +++ b/Assistant/Threads/Watcher.hs @@ -192,7 +192,7 @@ runHandler handler file filestatus = void $ do liftAnnex Annex.Queue.flushWhenFull recordChange change where - normalize f + normalize f | "./" `isPrefixOf` file = drop 2 f | otherwise = f @@ -246,7 +246,7 @@ onAddDirect symlinkssupported matcher file fs = do debug ["add direct", file] add matcher file where - {- On a filesystem without symlinks, we'll get changes for regular + {- On a filesystem without symlinks, we'll get changes for regular - files that git uses to stand-in for symlinks. Detect when - this happens, and stage the symlink, rather than annexing the - file. -} @@ -276,7 +276,7 @@ onAddSymlink isdirect file filestatus = unlessIgnored file $ do onAddSymlink' :: Maybe String -> Maybe Key -> Bool -> Handler onAddSymlink' linktarget mk isdirect file filestatus = go mk where - go (Just key) = do + go (Just key) = do when isdirect $ liftAnnex $ void $ addAssociatedFile key file link <- liftAnnex $ inRepo $ gitAnnexLink file key diff --git a/Assistant/Threads/WebApp.hs b/Assistant/Threads/WebApp.hs index 416c07874..b22b54a8d 100644 --- a/Assistant/Threads/WebApp.hs +++ b/Assistant/Threads/WebApp.hs @@ -97,7 +97,7 @@ webAppThread assistantdata urlrenderer noannex cannotrun postfirstrun listenhost urlfile <- getAnnex' $ fromRepo gitAnnexUrlFile go tlssettings addr webapp htmlshim (Just urlfile) where - -- The webapp thread does not wait for the startupSanityCheckThread + -- The webapp thread does not wait for the startupSanityCheckThread -- to finish, so that the user interface remains responsive while -- that's going on. thread = namedThreadUnchecked "WebApp" diff --git a/Assistant/Threads/XMPPClient.hs b/Assistant/Threads/XMPPClient.hs index 2f70b508f..8ce99eac6 100644 --- a/Assistant/Threads/XMPPClient.hs +++ b/Assistant/Threads/XMPPClient.hs @@ -131,7 +131,7 @@ xmppClient urlrenderer d creds xmppuuid = {- XEP-0199 says that the server will respond with either - a ping response or an error message. Either will - cause traffic, so good enough. -} - pingstanza = xmppPing selfjid + pingstanza = xmppPing selfjid handlemsg selfjid (PresenceMessage p) = do void $ inAssistant $ diff --git a/Assistant/Threads/XMPPPusher.hs b/Assistant/Threads/XMPPPusher.hs index 30c91c7f0..35c76ebf1 100644 --- a/Assistant/Threads/XMPPPusher.hs +++ b/Assistant/Threads/XMPPPusher.hs @@ -34,7 +34,7 @@ xmppReceivePackThread = pusherThread "XMPPReceivePack" ReceivePack pusherThread :: String -> PushSide -> UrlRenderer -> NamedThread pusherThread threadname side urlrenderer = namedThread threadname $ go Nothing where - go lastpushedto = do + go lastpushedto = do msg <- waitPushInitiation side $ selectNextPush lastpushedto debug ["started running push", logNetMessage msg] @@ -78,4 +78,4 @@ selectNextPush lastpushedto l = go [] l (Pushing clientid _) | Just clientid /= lastpushedto -> (m, rejected ++ ms) _ -> go (m:rejected) ms - go [] [] = undefined + go [] [] = undefined |