[UX] Log worker exit code when process dies unexpectedly (#38641)
Signed-off-by: Nick Cao <ncao@redhat.com> Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -280,9 +280,12 @@ class MultiprocExecutor(Executor):
|
||||
logger.debug("MultiprocWorkerMonitor: shutdown already initiated")
|
||||
return
|
||||
_self.is_failed = True
|
||||
proc_name = next(h.proc.name for h in workers if h.proc.sentinel == died[0])
|
||||
proc = next(h.proc for h in workers if h.proc.sentinel == died[0])
|
||||
logger.error(
|
||||
"Worker proc %s died unexpectedly, shutting down executor.", proc_name
|
||||
"Worker proc %s died unexpectedly (exit code: %s), "
|
||||
"shutting down executor.",
|
||||
proc.name,
|
||||
proc.exitcode,
|
||||
)
|
||||
_self.shutdown()
|
||||
callback = _self.failure_callback
|
||||
|
||||
Reference in New Issue
Block a user