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.
This commit is contained in:
Joey Hess 2012-10-30 17:23:42 -04:00
parent f6208bca0d
commit a1bd5b1fa0

View file

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