summaryrefslogtreecommitdiff
path: root/Assistant/Pushes.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Assistant/Pushes.hs')
-rw-r--r--Assistant/Pushes.hs16
1 files changed, 8 insertions, 8 deletions
diff --git a/Assistant/Pushes.hs b/Assistant/Pushes.hs
index 122d46d21..6ac19405a 100644
--- a/Assistant/Pushes.hs
+++ b/Assistant/Pushes.hs
@@ -26,20 +26,20 @@ getFailedPushesBefore duration = do
m <- atomically $ readTMVar v
now <- getCurrentTime
return $ M.keys $ M.filter (not . toorecent now) m
- where
- toorecent now time = now `diffUTCTime` time < duration
+ where
+ toorecent now time = now `diffUTCTime` time < duration
{- Modifies the map. -}
changeFailedPushMap :: (PushMap -> PushMap) -> Assistant ()
changeFailedPushMap a = do
v <- getAssistant failedPushMap
liftIO $ atomically $ store v . a . fromMaybe M.empty =<< tryTakeTMVar v
- where
- {- tryTakeTMVar empties the TMVar; refill it only if
- - the modified map is not itself empty -}
- store v m
- | m == M.empty = noop
- | otherwise = putTMVar v $! m
+ where
+ {- tryTakeTMVar empties the TMVar; refill it only if
+ - the modified map is not itself empty -}
+ store v m
+ | m == M.empty = noop
+ | otherwise = putTMVar v $! m
notifyPush :: [UUID] -> Assistant ()
notifyPush us = flip putTSet us <<~ (pushNotifierSuccesses . pushNotifier)