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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user