fix(v2): preserve execution cancellation and retry safety
This commit is contained in:
@@ -45,7 +45,8 @@ class Worker:
|
||||
execution = await claim(db, execution_id, self.owner)
|
||||
if execution is None:
|
||||
return False
|
||||
# M6 supplies source/repository work; this slice proves durable ownership.
|
||||
# Reload after the claim: a control request can race the lease acquisition.
|
||||
await db.refresh(execution)
|
||||
if execution.state == "cancelling":
|
||||
await complete_cancellation(db, execution.id, self.owner)
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user