From ce16d1caeae4c34a841af7354f84ee2fb916bb6c Mon Sep 17 00:00:00 2001 From: Thomas S Hatch Date: Fri, 1 Apr 2011 10:45:11 -0600 Subject: [PATCH] Got rid of the global timeout crap, timeout value is used for both singular and global timeouts --- salt/cli/__init__.py | 7 ------- salt/client.py | 4 ++-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/salt/cli/__init__.py b/salt/cli/__init__.py index 8d6ea933fa..8de50ee1c8 100644 --- a/salt/cli/__init__.py +++ b/salt/cli/__init__.py @@ -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 diff --git a/salt/client.py b/salt/client.py index 71606c6ed9..9702325840 100644 --- a/salt/client.py +++ b/salt/client.py @@ -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