mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Got rid of the global timeout crap, timeout value is used for both singular and
global timeouts
This commit is contained in:
parent
f27bbac438
commit
ce16d1caea
@ -33,12 +33,6 @@ class SaltCMD(object):
|
||||
type=int,
|
||||
dest='timeout',
|
||||
help='Set the return timeout for batch jobs; default=5 seconds')
|
||||
parser.add_option('-g',
|
||||
'--global-timeout',
|
||||
default=10,
|
||||
type=int,
|
||||
dest='global_timeout',
|
||||
help='How long to wait if no minions reply; default=10 seconds')
|
||||
parser.add_option('-E',
|
||||
'--pcre',
|
||||
default=False,
|
||||
@ -83,7 +77,6 @@ class SaltCMD(object):
|
||||
opts = {}
|
||||
|
||||
opts['timeout'] = options.timeout
|
||||
opts['global_timeout'] = options.global_timeout
|
||||
opts['pcre'] = options.pcre
|
||||
opts['list'] = options.list_
|
||||
opts['facter'] = options.facter
|
||||
|
@ -108,7 +108,7 @@ class LocalClient(object):
|
||||
'''
|
||||
return os.listdir(os.path.join(self.opts['pki_dir'], 'minions'))
|
||||
|
||||
def get_returns(self, jid, minions, timeout=5, global_timeout=10):
|
||||
def get_returns(self, jid, minions, timeout=5):
|
||||
'''
|
||||
This method starts off a watcher looking at the return data for a
|
||||
specified jid
|
||||
@ -137,7 +137,7 @@ class LocalClient(object):
|
||||
return ret
|
||||
if int(time.time()) > start + timeout:
|
||||
return ret
|
||||
if int(time.time()) > gstart + global_timeout and not ret:
|
||||
if int(time.time()) > gstart + timeout and not ret:
|
||||
# No minions have replied within the specified global timeout,
|
||||
# return an empty dict
|
||||
return ret
|
||||
|
Loading…
Reference in New Issue
Block a user