mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix issue in the timeout logic when calling all minions
This commit is contained in:
parent
77f7000f0a
commit
790f45af60
1 changed files with 7 additions and 3 deletions
|
@ -72,7 +72,7 @@ class LocalClient(object):
|
|||
specified jid
|
||||
'''
|
||||
jid_dir = os.path.join(self.opts['cachedir'], 'jobs', jid)
|
||||
start = int(time.time())
|
||||
start = 999999999999
|
||||
ret = {}
|
||||
# Wait for the hosts to check in
|
||||
while True:
|
||||
|
@ -80,8 +80,12 @@ class LocalClient(object):
|
|||
if fn_.startswith('.'):
|
||||
continue
|
||||
if not ret.has_key(fn_):
|
||||
ret[fn_] = pickle.load(open(os.path.join(jid_dir,
|
||||
fn_, 'return.p'), 'r'))
|
||||
retp = os.path.join(jid_dir, fn_, 'return.p')
|
||||
if not os.path.isfile(retp):
|
||||
continue
|
||||
ret[fn_] = pickle.load(open(retp, 'r'))
|
||||
if ret:
|
||||
start = int(time.time())
|
||||
if len(ret) >= len(minions):
|
||||
return ret
|
||||
if int(time.time()) > start + timeout:
|
||||
|
|
Loading…
Add table
Reference in a new issue