fix: prevent stuck batchTriggerAndWait by finalizing runs when they are cancelled (#2265)

This commit is contained in:
Eric Allam
2025-07-14 14:29:14 +01:00
committed by GitHub
parent 70b4b1257e
commit 6db1b71202
2 changed files with 2 additions and 1 deletions
@@ -1102,6 +1102,8 @@ export class RunAttemptSystem {
output: { value: JSON.stringify(error), isError: true },
});
await this.#finalizeRun(run);
this.$.eventBus.emit("runCancelled", {
time: new Date(),
run: {
@@ -441,7 +441,6 @@ export class TaskExecutor {
const abortPromise = new Promise((_, reject) => {
signal.addEventListener("abort", () => {
if (typeof signal.reason === "string" && signal.reason.includes("cancel")) {
console.log("abortPromise: cancel");
return;
}