Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
Per-job moveToDelayed for cooldown livelocked the worker: the activity key is refreshed by every user request, so 60s later the deferred job comes back, key is still set, defers again. Last 3h on prod logged ~1800 deferrals against 12 real inits and one completion every ~6 min. Tag RateLimitError with a `cause`. checkCooldown throws "cooldown"; the worker now calls `this.worker.rateLimit(delayMs)` and throws Worker.RateLimitError() — the whole queue waits once instead of cycling every job. checkTimeWindow throws "time-window"; that branch keeps the existing job.moveToDelayed (per-job) so EMEX (no scrape window) keeps flowing while PL24/pcat jobs sleep till 09:00. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>