From 8f4c7d8ff1538c2706bfe7c390d59fa0fdf39085 Mon Sep 17 00:00:00 2001 From: stroblme Date: Sun, 1 Nov 2026 10:59:35 +0100 Subject: [PATCH] Worker: wait for a node process's exit status before telling a signal from a failure --- worker/fluksio_worker/agent.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/worker/fluksio_worker/agent.py b/worker/fluksio_worker/agent.py index 210ad4d..f76e6d7 100644 --- a/worker/fluksio_worker/agent.py +++ b/worker/fluksio_worker/agent.py @@ -304,6 +304,10 @@ class Agent: while True: line = await loop.run_in_executor(None, worker.read_line) if not line: + # The pipe closes a moment before the exit status is + # there to read, and a signal is only told by the status. + with contextlib.suppress(subprocess.TimeoutExpired): + await loop.run_in_executor(None, worker.proc.wait, 1) await socket.send( json.dumps( {