improvement(scheduler): raise per-tick claim budget to drain backlog (#4567)

* 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.

* improvement(scheduler): raise per-tick claim budget to 200

Bumps MAX_CRON_CLAIMS 100 -> 200 (workflow/job split 100/100). Pairs
with the fire-and-forget cron Lambda change so per-tick processing
time is no longer bounded by the Lambda's 50s HTTP timeout.
This commit is contained in:
Theodore Li
2026-05-12 16:05:57 -04:00
committed by GitHub
parent 9d2dd8f550
commit 05892f74f2
+2 -2
View File
@@ -21,8 +21,8 @@ export const dynamic = 'force-dynamic'
export const maxDuration = 3600
const logger = createLogger('ScheduledExecuteAPI')
const MAX_CRON_CLAIMS = 20
const RESERVED_WORKFLOW_CLAIMS = 10
const MAX_CRON_CLAIMS = 200
const RESERVED_WORKFLOW_CLAIMS = 100
const RESERVED_JOB_CLAIMS = MAX_CRON_CLAIMS - RESERVED_WORKFLOW_CLAIMS
const STALE_SCHEDULE_CLAIM_MS = getMaxExecutionTimeout()