summaryrefslogtreecommitdiff
path: root/Assistant/Threads/Pusher.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-07-29 18:07:45 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-07-29 18:09:24 -0400
commitd52c93242450c0bd01e7d3c1fdae375806aa6e1f (patch)
treeea3ae0b9db0f7c859b8d260a70f54b41d9a4bd3c /Assistant/Threads/Pusher.hs
parentb2dc8fdb06068276869df682b439348aa96e57f5 (diff)
moved all alert messages into one file
Makes it easier to edit for consistent voice etc.
Diffstat (limited to 'Assistant/Threads/Pusher.hs')
-rw-r--r--Assistant/Threads/Pusher.hs10
1 files changed, 2 insertions, 8 deletions
diff --git a/Assistant/Threads/Pusher.hs b/Assistant/Threads/Pusher.hs
index 27e95a734..1b0420b9b 100644
--- a/Assistant/Threads/Pusher.hs
+++ b/Assistant/Threads/Pusher.hs
@@ -17,7 +17,6 @@ import Assistant.DaemonStatus
import qualified Command.Sync
import Utility.ThreadScheduler
import Utility.Parallel
-import qualified Remote
import Data.Time.Clock
import qualified Data.Map as M
@@ -38,12 +37,10 @@ pushRetryThread st dstatus pushmap = runEvery (Seconds halfhour) $ do
, "failed pushes"
]
now <- getCurrentTime
- alertWhile dstatus (alert topush) $
+ alertWhile dstatus (pushRetryAlert topush) $
pushToRemotes thisThread now st (Just pushmap) topush
where
halfhour = 1800
- alert rs = activityAlert (Just "Retrying sync") $
- "with " ++ unwords (map Remote.name rs) ++ ", which failed earlier."
{- This thread pushes git commits out to remotes soon after they are made. -}
pushThread :: ThreadState -> DaemonStatusHandle -> CommitChan -> FailedPushMap -> IO ()
@@ -57,7 +54,7 @@ pushThread st dstatus commitchan pushmap = do
if shouldPush now commits
then do
remotes <- knownRemotes <$> getDaemonStatus dstatus
- alertWhile dstatus (syncalert remotes) $
+ alertWhile dstatus (pushAlert remotes) $
pushToRemotes thisThread now st (Just pushmap) remotes
else do
debug thisThread
@@ -66,9 +63,6 @@ pushThread st dstatus commitchan pushmap = do
, "commits"
]
refillCommits commitchan commits
- where
- syncalert rs = activityAlert Nothing $
- "Syncing with " ++ unwords (map Remote.name rs)
{- Decide if now is a good time to push to remotes.
-