Skip to content

Commit 737ff99

Browse files
committed
When cancelling a run in the UI make sure the task run status is cancelled not interrupted
1 parent fc4b95d commit 737ff99

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

apps/webapp/app/v3/services/cancelAttempt.server.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { logger } from "~/services/logger.server";
66

77
import { PrismaClientOrTransaction, prisma } from "~/db.server";
88
import { ResumeTaskRunDependenciesService } from "./resumeTaskRunDependencies.server";
9+
import { CANCELLABLE_STATUSES } from "./cancelTaskRun.server";
910

1011
export class CancelAttemptService extends BaseService {
1112
public async call(
@@ -54,7 +55,9 @@ export class CancelAttemptService extends BaseService {
5455
taskRun: {
5556
update: {
5657
data: {
57-
status: "INTERRUPTED",
58+
status: CANCELLABLE_STATUSES.includes(taskRunAttempt.taskRun.status)
59+
? "INTERRUPTED"
60+
: undefined,
5861
},
5962
},
6063
},

0 commit comments

Comments
 (0)