mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add sleep to eval_master
This commit is contained in:
parent
878946d0f8
commit
d3f7dd7f50
1 changed files with 8 additions and 0 deletions
|
@ -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} '
|
||||
|
|
Loading…
Add table
Reference in a new issue