Add sleep to eval_master

This commit is contained in:
twangboy 2017-02-15 09:45:09 -07:00
parent 878946d0f8
commit d3f7dd7f50

View file

@ -534,6 +534,10 @@ class MinionBase(object):
opts['master_uri_list'].append(resolve_dns(opts)['master_uri'])
while True:
if attempts != 0:
# Give up a little time between connection attempts
# to allow the IOLoop to run any other scheduled tasks.
yield tornado.gen.sleep(opts['acceptance_wait_time'])
attempts += 1
if tries > 0:
log.debug('Connecting to master. Attempt {0} '
@ -588,6 +592,10 @@ class MinionBase(object):
if opts['random_master']:
log.warning('random_master is True but there is only one master specified. Ignoring.')
while True:
if attempts != 0:
# Give up a little time between connection attempts
# to allow the IOLoop to run any other scheduled tasks.
yield tornado.gen.sleep(opts['acceptance_wait_time'])
attempts += 1
if tries > 0:
log.debug('Connecting to master. Attempt {0} '