From 42b427f6fc711254ac9ff1f047568f3584a406f7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 24 Nov 2013 13:20:58 -0400 Subject: 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. --- Assistant/Threads/UpgradeWatcher.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Assistant/Threads/UpgradeWatcher.hs') 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 -- cgit v1.2.3