|
6 | 6 | RunJobSuccess, |
7 | 7 | RunSourceContextSchema, |
8 | 8 | } from "@trigger.dev/core"; |
9 | | -import type { Task } from "@trigger.dev/database"; |
| 9 | +import { RuntimeEnvironmentType, type Task } from "@trigger.dev/database"; |
10 | 10 | import { generateErrorMessage } from "zod-error"; |
11 | 11 | import { eventRecordToApiJson } from "~/api.server"; |
12 | 12 | import { $transaction, PrismaClient, PrismaClientOrTransaction, prisma } from "~/db.server"; |
@@ -135,7 +135,9 @@ export class PerformRunExecutionV2Service { |
135 | 135 | }, |
136 | 136 | }); |
137 | 137 |
|
138 | | - await enqueueRunExecutionV2(run, tx); |
| 138 | + await enqueueRunExecutionV2(run, tx, { |
| 139 | + skipRetrying: run.environment.type === RuntimeEnvironmentType.DEVELOPMENT, |
| 140 | + }); |
139 | 141 | }); |
140 | 142 | } |
141 | 143 | } |
@@ -337,6 +339,7 @@ export class PerformRunExecutionV2Service { |
337 | 339 | runAt: data.task.delayUntil ?? undefined, |
338 | 340 | resumeTaskId: data.task.id, |
339 | 341 | isRetry, |
| 342 | + skipRetrying: run.environment.type === RuntimeEnvironmentType.DEVELOPMENT, |
340 | 343 | }); |
341 | 344 | } |
342 | 345 | }); |
@@ -409,6 +412,7 @@ export class PerformRunExecutionV2Service { |
409 | 412 | runAt: data.retryAt, |
410 | 413 | resumeTaskId: data.task.id, |
411 | 414 | isRetry, |
| 415 | + skipRetrying: run.environment.type === RuntimeEnvironmentType.DEVELOPMENT, |
412 | 416 | }); |
413 | 417 | }); |
414 | 418 | } |
@@ -464,7 +468,9 @@ export class PerformRunExecutionV2Service { |
464 | 468 | }, |
465 | 469 | }); |
466 | 470 |
|
467 | | - await enqueueRunExecutionV2(run, tx); |
| 471 | + await enqueueRunExecutionV2(run, tx, { |
| 472 | + skipRetrying: run.environment.type === RuntimeEnvironmentType.DEVELOPMENT, |
| 473 | + }); |
468 | 474 |
|
469 | 475 | break; |
470 | 476 | } |
|
0 commit comments