mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Performance improvements for HostVars and some bugfixes
This commit is contained in:
parent
9d23acf302
commit
5cbeab5a3c
6 changed files with 85 additions and 84 deletions
|
@ -58,7 +58,7 @@ class ResultProcess(multiprocessing.Process):
|
|||
|
||||
def _send_result(self, result):
|
||||
debug(u"sending result: %s" % ([text_type(x) for x in result],))
|
||||
self._final_q.put(result, block=False)
|
||||
self._final_q.put(result)
|
||||
debug("done sending result")
|
||||
|
||||
def _read_worker_result(self):
|
||||
|
@ -73,7 +73,7 @@ class ResultProcess(multiprocessing.Process):
|
|||
try:
|
||||
if not rslt_q.empty():
|
||||
debug("worker %d has data to read" % self._cur_worker)
|
||||
result = rslt_q.get(block=False)
|
||||
result = rslt_q.get()
|
||||
debug("got a result from worker %d: %s" % (self._cur_worker, result))
|
||||
break
|
||||
except queue.Empty:
|
||||
|
@ -101,7 +101,7 @@ class ResultProcess(multiprocessing.Process):
|
|||
try:
|
||||
result = self._read_worker_result()
|
||||
if result is None:
|
||||
time.sleep(0.01)
|
||||
time.sleep(0.0001)
|
||||
continue
|
||||
|
||||
clean_copy = strip_internal_keys(result._result)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue