SakshamKapoor2911 commented on code in PR #67881:
URL: https://github.com/apache/airflow/pull/67881#discussion_r3337931968


##########
airflow-core/src/airflow/executors/local_executor.py:
##########
@@ -270,7 +285,11 @@ def end(self) -> None:
         self.result_queue.close()
 
     def terminate(self):
-        """Terminate the executor is not doing anything."""
+        """Forcefully terminate all worker processes under control of the 
executor."""
+        self.log.info("Terminating all LocalExecutor worker processes.")
+        for proc in self.workers.values():
+            if proc.is_alive():
+                proc.terminate()

Review Comment:
   Good catch. Addressed this in the latest commit (`5bdc31aa44`) by adding a 
`proc.join(timeout=0.2)` immediately after `proc.terminate()` to properly reap 
the worker processes from the OS table.



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