From 0e5931b1f8daefe12d7122448e16e14420b7f07b Mon Sep 17 00:00:00 2001 From: Semih Yesilyurt Date: Sat, 26 Sep 2026 15:18:06 +0300 Subject: [PATCH] =?UTF-8?q?fix(carcatonline):=20varsay=C4=B1lan=20=C3=A7a?= =?UTF-8?q?=C4=9Fr=C4=B1=20aral=C4=B1=C4=9F=C4=B1=206,5=20s=20(dev'de=2011?= =?UTF-8?q?0=20=C3=A7a=C4=9Fr=C4=B1/2,2=20s=20=E2=86=92=20429;=20kota=20~1?= =?UTF-8?q?00=20=C3=A7a=C4=9Fr=C4=B1/pencere)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5.1 --- .../api/src/integrations/carcatonline/carcatonline.pacing.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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),