Skip to content

Commit 6db1b71

Browse files
authored
fix: prevent stuck batchTriggerAndWait by finalizing runs when they are cancelled (#2265)
1 parent 70b4b12 commit 6db1b71

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
@@ -441,7 +441,6 @@ export class TaskExecutor {
441441
const abortPromise = new Promise((_, reject) => {
442442
signal.addEventListener("abort", () => {
443443
if (typeof signal.reason === "string" && signal.reason.includes("cancel")) {
444-
console.log("abortPromise: cancel");
445444
return;
446445
}
447446

0 commit comments

Comments
 (0)