File
Blob: src/worker/dispatch/workflows/step-config.ts
| 1 | const CONTROL_PLANE_STEP_RETRY_LIMIT = 3; |
| 2 | const CONTROL_PLANE_STEP_RETRY_DELAY_MS = 1_000; |
| 3 | const CONTROL_PLANE_STEP_TIMEOUT_MS = 30_000; |
| 4 | |
| 5 | // Cloudflare Workflows: retries.limit = total attempts (not retries). limit: 1 = one attempt, zero retries. |
| 6 | export const noRetryStepConfig = (timeoutMs = 10 * 60 * 1_000) => ({ |
| 7 | retries: { |
| 8 | limit: 1, |
| 9 | delay: CONTROL_PLANE_STEP_RETRY_DELAY_MS, |
| 10 | }, |
| 11 | timeout: timeoutMs, |
| 12 | }); |
| 13 | |
| 14 | export const boundedRetryStepConfig = (timeoutMs = CONTROL_PLANE_STEP_TIMEOUT_MS) => ({ |
| 15 | retries: { |
| 16 | limit: CONTROL_PLANE_STEP_RETRY_LIMIT, |
| 17 | delay: CONTROL_PLANE_STEP_RETRY_DELAY_MS, |
| 18 | backoff: "constant" as const, |
| 19 | }, |
| 20 | timeout: timeoutMs, |
| 21 | }); |