Skip to content

Commit 5a6fef9

Browse files
committed
fix: prevent stuck batchTriggerAndWait by finalizing runs when they are cancelled
1 parent 0c71dc7 commit 5a6fef9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

internal-packages/run-engine/src/engine/systems/runAttemptSystem.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,6 +1102,8 @@ export class RunAttemptSystem {
11021102
output: { value: JSON.stringify(error), isError: true },
11031103
});
11041104

1105+
await this.#finalizeRun(run);
1106+
11051107
this.$.eventBus.emit("runCancelled", {
11061108
time: new Date(),
11071109
run: {

packages/core/src/v3/workers/taskExecutor.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,6 @@ export class TaskExecutor {
440440
const abortPromise = new Promise((_, reject) => {
441441
signal.addEventListener("abort", () => {
442442
if (typeof signal.reason === "string" && signal.reason.includes("cancel")) {
443-
console.log("abortPromise: cancel");
444443
return;
445444
}
446445

0 commit comments

Comments
 (0)