From a1bd5b1fa07aa5dff408780b967468d7c9731424 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 30 Oct 2012 17:23:42 -0400 Subject: [PATCH] don't delay at startup Still wait 1 minute after a change before waiting on the next change, but don't wait at the start, when we might get a pull that contains config changes right away. --- Assistant/Threads/ConfigMonitor.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assistant/Threads/ConfigMonitor.hs b/Assistant/Threads/ConfigMonitor.hs index a1726a3616..2d012ad80f 100644 --- a/Assistant/Threads/ConfigMonitor.hs +++ b/Assistant/Threads/ConfigMonitor.hs @@ -38,7 +38,6 @@ configMonitorThread :: NamedThread configMonitorThread = NamedThread "ConfigMonitor" $ loop =<< getConfigs where loop old = do - liftIO $ threadDelaySeconds (Seconds 60) waitBranchChange new <- getConfigs when (old /= new) $ do @@ -49,6 +48,7 @@ configMonitorThread = NamedThread "ConfigMonitor" $ loop =<< getConfigs {- Record a commit to get this config - change pushed out to remotes. -} recordCommit + liftIO $ threadDelaySeconds (Seconds 60) loop new {- Config files, and their checksums. -}