pause_intake answers False when claimed work outlasts its timeout, and reload then resumes intake and raises RebuildBusy before tearing anything down

This commit is contained in:
2026-11-05 06:43:33 +01:00
parent 1a622edb1f
commit 78b2c1438c
3 changed files with 39 additions and 6 deletions
+7 -2
View File
@@ -741,8 +741,13 @@ class FlowController:
try:
# Work already claimed belongs to the pipeline it was claimed
# against; let it finish there before swapping the graph out.
if self.execution is not None:
await run_in_threadpool(self.execution.pause_intake)
# Work that does not finish in time keeps the old graph, which
# nothing has touched yet.
if self.execution is not None and not await run_in_threadpool(
self.execution.pause_intake
):
self.execution.resume_intake()
raise RebuildBusy("Claimed work is still running on the pipeline")
await self._teardown()
# A fresh supervisor per build, so a flow quarantined by the last
# one gets another chance once its author has changed something.