Skip to content

Commit 97875b9

Browse files
committed
allow resume unless final run status
1 parent 79f2c8b commit 97875b9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { socketIo } from "../handleSocketIo.server";
1212
import { SharedQueueMessageBody, sharedQueueTasks } from "../marqs/sharedQueueConsumer.server";
1313
import { BaseService } from "./baseService.server";
1414
import { TaskRunAttempt } from "@trigger.dev/database";
15+
import { isFinalRunStatus } from "../taskStatus";
1516

1617
export class ResumeAttemptService extends BaseService {
1718
public async call(
@@ -80,10 +81,11 @@ export class ResumeAttemptService extends BaseService {
8081
return;
8182
}
8283

83-
if (attempt.taskRun.status !== "WAITING_TO_RESUME") {
84+
if (isFinalRunStatus(attempt.taskRun.status)) {
8485
logger.error("Run is not resumable", {
8586
attemptId: attempt.id,
8687
runId: attempt.taskRunId,
88+
status: attempt.taskRun.status,
8789
});
8890
return;
8991
}

0 commit comments

Comments
 (0)