summaryrefslogtreecommitdiff
path: root/Assistant/Threads/Pusher.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-01-26 17:09:33 +1100
committerGravatar Joey Hess <joey@kitenet.net>2013-01-26 17:09:33 +1100
commitdc60216eb8fe919acf7ab3984a5f0bf0e0193f6b (patch)
tree7fb8c8bd0189f1868e732fc1c6047df933333ecf /Assistant/Threads/Pusher.hs
parentf0f97334d017eac6d1693bac90c772022fa57aa7 (diff)
webapp: Now allows restarting any threads that crash.
Diffstat (limited to 'Assistant/Threads/Pusher.hs')
-rw-r--r--Assistant/Threads/Pusher.hs7
1 files changed, 2 insertions, 5 deletions
diff --git a/Assistant/Threads/Pusher.hs b/Assistant/Threads/Pusher.hs
index 035a454a1..a444a8530 100644
--- a/Assistant/Threads/Pusher.hs
+++ b/Assistant/Threads/Pusher.hs
@@ -19,12 +19,9 @@ import qualified Types.Remote as Remote
import Data.Time.Clock
-thisThread :: ThreadName
-thisThread = "Pusher"
-
{- This thread retries pushes that failed before. -}
pushRetryThread :: NamedThread
-pushRetryThread = NamedThread "PushRetrier" $ runEvery (Seconds halfhour) <~> do
+pushRetryThread = namedThread "PushRetrier" $ runEvery (Seconds halfhour) <~> do
-- We already waited half an hour, now wait until there are failed
-- pushes to retry.
topush <- getFailedPushesBefore (fromIntegral halfhour)
@@ -38,7 +35,7 @@ pushRetryThread = NamedThread "PushRetrier" $ runEvery (Seconds halfhour) <~> do
{- This thread pushes git commits out to remotes soon after they are made. -}
pushThread :: NamedThread
-pushThread = NamedThread "Pusher" $ runEvery (Seconds 2) <~> do
+pushThread = namedThread "Pusher" $ runEvery (Seconds 2) <~> do
-- We already waited two seconds as a simple rate limiter.
-- Next, wait until at least one commit has been made
commits <- getCommits