Merge pull request #13432 from cachedout/no_minion_delay

Don't sleep if we don't need to
This commit is contained in:
Thomas S Hatch 2014-06-12 16:49:30 -06:00
commit cf4c0b62cc

View File

@ -1448,7 +1448,10 @@ class Minion(MinionBase):
# On first startup execute a state run if configured to do so
self._state_run()
time.sleep(.5)
if self.opts['startup_states']:
startup_sleep_length = 0.5
log.debug('Sleeping for {0}s before running startup states'.format(startup_sleep_length))
time.sleep(startup_sleep_length)
loop_interval = int(self.opts['loop_interval'])