Remove unused rslt_q, rename the one queue to final_q everywhere (#43894)

* Remove unused rslt_q, rename the one queue to final_q everywhere

* Test update
This commit is contained in:
Matt Martz 2018-08-13 13:43:28 -05:00 committed by GitHub
parent 5a49567c71
commit 17c89d1ffa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 23 additions and 25 deletions

View file

@ -114,8 +114,7 @@ class TaskQueueManager:
self._workers = []
for i in range(num):
rslt_q = multiprocessing.Queue()
self._workers.append([None, rslt_q])
self._workers.append(None)
def _initialize_notified_handlers(self, play):
'''
@ -307,8 +306,7 @@ class TaskQueueManager:
def _cleanup_processes(self):
if hasattr(self, '_workers'):
for (worker_prc, rslt_q) in self._workers:
rslt_q.close()
for worker_prc in self._workers:
if worker_prc and worker_prc.is_alive():
try:
worker_prc.terminate()
@ -340,8 +338,8 @@ class TaskQueueManager:
defunct = False
for (idx, x) in enumerate(self._workers):
if hasattr(x[0], 'exitcode'):
if x[0].exitcode in [-9, -11, -15]:
if hasattr(x, 'exitcode'):
if x.exitcode in [-9, -11, -15]:
defunct = True
return defunct