webapp: Improved alerts displayed when syncing with remotes, and when syncing with a remote fails.

This commit is contained in:
Joey Hess 2013-03-18 16:19:42 -04:00
parent 80c8c0e62a
commit cdb21649d0
7 changed files with 83 additions and 62 deletions

View file

@ -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