Revert "Flush the queued items in linear periodically"

This reverts commit d3418fd658.
This commit is contained in:
James Cammarata 2016-09-11 14:28:49 -05:00
parent 600915aa97
commit f5cff2ced5
2 changed files with 5 additions and 9 deletions

View file

@ -181,7 +181,7 @@ class StrategyBase:
return False return False
passes = 1 passes = 1
while not self._tqm._terminated and passes < 3 and self._pending_results > 0: while not self._tqm._terminated and passes < 3:
try: try:
task_result = self._final_q.get(timeout=timeout) task_result = self._final_q.get(timeout=timeout)
original_host = get_original_host(task_result._host) original_host = get_original_host(task_result._host)

View file

@ -266,14 +266,10 @@ class StrategyModule(StrategyBase):
if run_once: if run_once:
break break
# flush the queue if we've got more items than we have workers, # FIXME: probably not required here any more with the result proc
# and read back any results which may have arrived already # having been removed, so there's no only a single result
if len(items_to_queue) > len(self._tqm._workers): # queue for the main thread
self._tqm.queue_multiple_tasks(items_to_queue, play_context) results += self._process_pending_results(iterator, one_pass=True)
items_to_queue = []
if self._pending_results > 0:
results += self._process_pending_results(iterator, one_pass=True)
self._tqm.queue_multiple_tasks(items_to_queue, play_context) self._tqm.queue_multiple_tasks(items_to_queue, play_context)