jscheffl commented on code in PR #65943:
URL: https://github.com/apache/airflow/pull/65943#discussion_r3236880223


##########
providers/edge3/src/airflow/providers/edge3/cli/worker.py:
##########
@@ -603,37 +678,32 @@ async def fetch_and_run_job(self) -> None:
             self.background_tasks.add(task)
             task.add_done_callback(self.background_tasks.discard)
 
-        while job.is_running and results_queue.empty():
+        while job.should_poll_logs:
             await self._push_logs_in_chunks(job)
             for _ in range(0, self.job_poll_interval * 10):
                 await sleep(0.1)
                 if not job.is_running:
                     break
         await self._push_logs_in_chunks(job)
-        supervisor_msg = (
-            "(Unknown error, no exception details available)"
-            if results_queue.empty()
-            else results_queue.get()
-        )
-        # Ensure that supervisor really ended after we grabbed results from 
queue
-        while True:
-            if not job.is_running:
-                break
+        # Wait for the child process to fully exit.
+        while job.is_running:  # noqa: ASYNC110
             await sleep(0.1)

Review Comment:
   I think this is not needed anymore as in lin e681 the same condition was 
checked.
   Was different in previous codebase as also queue could have been filled and 
then the second wait was needed to ensure process really terminated after 
posting message to queue. But no queue then only loop in 681 exists when 
process is complete.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to