Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/pretty-zoos-approve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@trigger.dev/sdk": patch
---

added isRetry in context run
1 change: 1 addition & 0 deletions apps/webapp/app/services/runs/continueRun.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export class ContinueRunService {
status: "PENDING",
reason: "EXECUTE_JOB",
retryLimit: EXECUTE_JOB_RETRY_LIMIT,
isRetry: true,
},
});

Expand Down
3 changes: 2 additions & 1 deletion apps/webapp/app/services/runs/performRunExecution.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export class PerformRunExecutionService {
}
}
async #executeJob(execution: FoundRunExecution) {
const { run } = execution;
const { run, isRetry } = execution;

if (run.status === "CANCELED") {
await this.#cancelExecution(execution);
Expand Down Expand Up @@ -264,6 +264,7 @@ export class PerformRunExecutionService {
id: run.id,
isTest: run.isTest,
startedAt,
isRetry,
},
environment: {
id: run.environment.id,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "JobRunExecution" ADD COLUMN "isRetry" BOOLEAN NOT NULL DEFAULT false;
2 changes: 2 additions & 0 deletions packages/database/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,8 @@ model JobRunExecution {
resumeTaskId String?

graphileJobId String?

isRetry Boolean @default(false)
}

enum JobRunExecutionReason {
Expand Down
1 change: 1 addition & 0 deletions packages/internal/src/schemas/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ export const RunJobBodySchema = z.object({
run: z.object({
id: z.string(),
isTest: z.boolean(),
isRetry: z.boolean(),
startedAt: z.coerce.date(),
}),
environment: z.object({
Expand Down