When cancelling a run in the UI make sure the task run status is cancelled not interrupted

This commit is contained in:
Eric Allam
2024-03-20 13:22:50 +00:00
parent fc4b95d69e
commit 737ff9928c
@@ -6,6 +6,7 @@ import { logger } from "~/services/logger.server";
import { PrismaClientOrTransaction, prisma } from "~/db.server";
import { ResumeTaskRunDependenciesService } from "./resumeTaskRunDependencies.server";
import { CANCELLABLE_STATUSES } from "./cancelTaskRun.server";
export class CancelAttemptService extends BaseService {
public async call(
@@ -54,7 +55,9 @@ export class CancelAttemptService extends BaseService {
taskRun: {
update: {
data: {
status: "INTERRUPTED",
status: CANCELLABLE_STATUSES.includes(taskRunAttempt.taskRun.status)
? "INTERRUPTED"
: undefined,
},
},
},