Moving result reading to a background thread

This commit is contained in:
James Cammarata 2016-09-16 00:14:53 -05:00
parent dfb1c0647e
commit 5a57c66e3c
7 changed files with 382 additions and 246 deletions

View file

@ -263,17 +263,15 @@ class StrategyModule(StrategyBase):
if run_once:
break
# FIXME: probably not required here any more with the result proc
# having been removed, so there's no only a single result
# queue for the main thread
results += self._process_pending_results(iterator, one_pass=True)
results += self._process_pending_results(iterator, max_passes=max(1, int(len(self._tqm._workers) * 0.1)))
# go to next host/task group
if skip_rest:
continue
display.debug("done queuing things up, now waiting for results queue to drain")
results += self._wait_on_pending_results(iterator)
if self._pending_results > 0:
results += self._wait_on_pending_results(iterator)
host_results.extend(results)
all_role_blocks = []