ashb commented on a change in pull request #5615: [AIRFLOW-XXX] Use
events/messages not multiprocessing.Manager
URL: https://github.com/apache/airflow/pull/5615#discussion_r306255236
##########
File path: airflow/jobs/scheduler_job.py
##########
@@ -236,22 +236,19 @@ def done(self):
if self._done:
return True
- # In case result queue is corrupted.
- if self._result_queue and not self._result_queue.empty():
- self._result = self._result_queue.get()
+ if self._parent_channel.poll():
+ self._result = self._parent_channel.recv()
self._done = True
self.log.debug("Waiting for %s", self._process)
self._process.join()
+ self._parent_channel.close()
return True
- # Potential error case when process dies
- if self._result_queue and not self._process.is_alive():
+ if not self._process.is_alive():
self._done = True
- # Get the object from the queue or else join() can hang.
- if not self._result_queue.empty():
- self._result = self._result_queue.get()
self.log.debug("Waiting for %s", self._process)
self._process.join()
Review comment:
See next comment.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services