diff --git a/apps/api/src/integrations/carcatonline/carcatonline.pacing.ts b/apps/api/src/integrations/carcatonline/carcatonline.pacing.ts index d1f52de..71e5810 100644 --- a/apps/api/src/integrations/carcatonline/carcatonline.pacing.ts +++ b/apps/api/src/integrations/carcatonline/carcatonline.pacing.ts @@ -2,7 +2,8 @@ * Shared throttling primitives for carcatonline (used by the worker backfill and * the API's on-demand parts fetch). All state lives in Redis so the API and the * worker share one budget: - * - min interval between calls (measured: 1 call / 2 s is sustained, bursts lock the API ~36 min) + * - min interval between calls (measured 2026-09-26: ~110 calls at 1/2.2 s → 429 + ~40 min lockout; + * the quota looks like ~100 calls per window, so the default is 1 call / 6.5 s ≈ 9/min) * - lockout flag set on any 429 * - per-Istanbul-day call counter with a hard cap * - the night window (default 20:00–07:00 Europe/Istanbul) for bulk work @@ -41,7 +42,7 @@ export function carcatConfigFromEnv(env: NodeJS.ProcessEnv = process.env): Carca return Number.isFinite(n) && n >= 0 ? n : d; }; return { - minIntervalMs: num(env.CARCATONLINE_MIN_INTERVAL_MS, 2200), + minIntervalMs: num(env.CARCATONLINE_MIN_INTERVAL_MS, 6500), dailyCallCap: num(env.CARCATONLINE_DAILY_CALL_CAP, 15000), windowStartHour: num(env.CARCATONLINE_WINDOW_START, 20), windowEndHour: num(env.CARCATONLINE_WINDOW_END, 7),