fix: reconcile live scheduled resume cancellation
This commit is contained in:
+5
-7
@@ -221,14 +221,12 @@ class WorkflowRunApi:
|
||||
store=store,
|
||||
)
|
||||
except asyncio.CancelledError:
|
||||
# Shutdown drain cancelled the execution mid-flight (or the
|
||||
# caller went away): fence, don't release. The durable
|
||||
# executing mark and the ACTIVE attempt stay exactly as a
|
||||
# crash mid-resume would leave them, so restart recovery
|
||||
# fails the run closed instead of presenting a half-resumed
|
||||
# run as safe to retry. Cancellation is never swallowed.
|
||||
# Shutdown cancellation keeps the durable crash shape for
|
||||
# restart recovery. A caller cancellation while the service is
|
||||
# still live is reconciled for this run immediately, so its
|
||||
# ambiguous failure frees capacity without becoming retryable.
|
||||
if slot_held and gate is not None:
|
||||
gate.fence(run_id)
|
||||
gate.reconcile_cancelled(run_id)
|
||||
raise
|
||||
except BaseException:
|
||||
# Pre-persist errors, torn persists, and validation failures:
|
||||
|
||||
Reference in New Issue
Block a user