Skip to content

Commit 99f40df

Browse files
improvement(scheduler): raise per-tick claim budget to drain backlog
MAX_CRON_CLAIMS 20 -> 100; reserved workflow/job slots 10/10 -> 50/50. Throughput was capped at 20 schedules/tick which created a 20+ hour backlog when due work exceeded ~1 item per cron-second.
1 parent 22b5a1e commit 99f40df

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • apps/sim/app/api/schedules/execute

apps/sim/app/api/schedules/execute/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ export const dynamic = 'force-dynamic'
2121
export const maxDuration = 3600
2222

2323
const logger = createLogger('ScheduledExecuteAPI')
24-
const MAX_CRON_CLAIMS = 20
25-
const RESERVED_WORKFLOW_CLAIMS = 10
24+
const MAX_CRON_CLAIMS = 100
25+
const RESERVED_WORKFLOW_CLAIMS = 50
2626
const RESERVED_JOB_CLAIMS = MAX_CRON_CLAIMS - RESERVED_WORKFLOW_CLAIMS
2727
const STALE_SCHEDULE_CLAIM_MS = getMaxExecutionTimeout()
2828

0 commit comments

Comments
 (0)