From 295c7ce1c8406cd498bfa74f55d6d9571442f1f8 Mon Sep 17 00:00:00 2001 From: Andrey Shestakov Date: Tue, 31 May 2016 09:33:58 +0300 Subject: [PATCH] Fix sleep intervals (14219) --- lib/ansible/executor/process/result.py | 2 +- lib/ansible/plugins/strategy/__init__.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ansible/executor/process/result.py b/lib/ansible/executor/process/result.py index 1e53d9191ba..520c0e4ce1f 100644 --- a/lib/ansible/executor/process/result.py +++ b/lib/ansible/executor/process/result.py @@ -106,7 +106,7 @@ class ResultProcess(multiprocessing.Process): try: result = self._read_worker_result() if result is None: - time.sleep(0.0001) + time.sleep(0.01) continue # send callbacks for 'non final' results diff --git a/lib/ansible/plugins/strategy/__init__.py b/lib/ansible/plugins/strategy/__init__.py index c93626a7ede..beeecdb8dfd 100644 --- a/lib/ansible/plugins/strategy/__init__.py +++ b/lib/ansible/plugins/strategy/__init__.py @@ -196,7 +196,7 @@ class StrategyBase: self._cur_worker += 1 if self._cur_worker >= len(self._workers): self._cur_worker = 0 - time.sleep(0.0001) + time.sleep(0.01) if queued: break @@ -389,7 +389,7 @@ class StrategyBase: raise AnsibleError("unknown result message received: %s" % result[0]) except Queue.Empty: - time.sleep(0.0001) + time.sleep(0.01) if one_pass: break @@ -408,7 +408,7 @@ class StrategyBase: while self._pending_results > 0 and not self._tqm._terminated: results = self._process_pending_results(iterator) ret_results.extend(results) - time.sleep(0.0001) + time.sleep(0.01) display.debug("no more pending results, returning what we have") return ret_results