rjgoyln commented on code in PR #72817:
URL: https://github.com/apache/airflow/pull/72817#discussion_r3970643552
##########
providers/celery/src/airflow/providers/celery/cli/celery_command.py:
##########
@@ -383,8 +383,13 @@ def stop_worker(args):
# Send SIGTERM
if pid:
- worker_process = psutil.Process(pid)
- worker_process.terminate()
+ try:
+ worker_process = psutil.Process(pid)
Review Comment:
Out of scope for this PR, but the sibling case is still open: if the OS has
recycled the stale PID, psutil.Process(pid) succeeds and terminate() may signal
an unrelated process. `check_if_pidfile_process_is_running` has the same gap,
so nothing here regresses — just flagging that comparing
`worker_process.name()`/`cmdline()` before signalling is the natural follow-up.
--
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]