fix: prevent stuck batchTriggerAndWait by finalizing runs when they are cancelled (#2265)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user