summaryrefslogtreecommitdiff
path: root/Assistant/Threads/UpgradeWatcher.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-11-24 13:20:58 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-11-24 13:20:58 -0400
commit42b427f6fc711254ac9ff1f047568f3584a406f7 (patch)
treecb464fe3207a87f36d00892558659b1322dca913 /Assistant/Threads/UpgradeWatcher.hs
parent3a1ba10f775df8bf742a10cf8c8a8672b63f78b8 (diff)
add support for fully automatic upgrades
The Upgrader avoids checking for upgrades on startup when it was just upgraded. This avoids an upgrade loop if something goes wrong. One example of something going wrong would be if the upgrade info file and the distribution file get out of sync (or the distribution file is cached in a proxy), so it thinks it has upgraded to a new version, but has really not.
Diffstat (limited to 'Assistant/Threads/UpgradeWatcher.hs')
-rw-r--r--Assistant/Threads/UpgradeWatcher.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Assistant/Threads/UpgradeWatcher.hs b/Assistant/Threads/UpgradeWatcher.hs
index c127e3b2f..80b11e71a 100644
--- a/Assistant/Threads/UpgradeWatcher.hs
+++ b/Assistant/Threads/UpgradeWatcher.hs
@@ -8,7 +8,7 @@
{-# LANGUAGE CPP #-}
module Assistant.Threads.UpgradeWatcher (
- upgradWatcherThread
+ upgradeWatcherThread
) where
import Assistant.Common
@@ -30,9 +30,9 @@ import qualified Data.Text as T
data WatcherState = InStartupScan | Started | Upgrading
deriving (Eq)
-upgradWatcherThread :: UrlRenderer -> NamedThread
-upgradWatcherThread urlrenderer = namedThread "UpgradeWatcher" $ do
- whenM (liftIO $ checkSuccessfulUpgrade) $
+upgradeWatcherThread :: UrlRenderer -> NamedThread
+upgradeWatcherThread urlrenderer = namedThread "UpgradeWatcher" $ do
+ whenM (liftIO checkSuccessfulUpgrade) $
showSuccessfulUpgrade urlrenderer
go =<< liftIO upgradeFlagFile
where