From 8f0ec8a5b8a38ae7a95f53fa79a1370737451c91 Mon Sep 17 00:00:00 2001 From: nk Date: Wed, 3 Jun 2026 17:17:12 +0300 Subject: [PATCH] =?UTF-8?q?perf(enrich):=20=D1=81=D0=BD=D0=B8=D0=B7=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D0=BF=D0=B0=D1=80=D0=B0=D0=BB=D0=BB=D0=B5=D0=BB?= =?UTF-8?q?=D1=8C=D0=BD=D0=BE=D1=81=D1=82=D1=8C=203->2=20(=D1=83=D0=BB?= =?UTF-8?q?=D0=BE=D0=B6=D0=B8=D1=82=D1=8C=D1=81=D1=8F=20=D0=B2=20=D0=BB?= =?UTF-8?q?=D0=B8=D0=BC=D0=B8=D1=82=20Discogs=2060/=D0=BC=D0=B8=D0=BD)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Темп 83/мин давал Discogs 429 (жанры не дотягивались). concurrency=2, throttle 1.2с → ~40/мин, под лимитом. Обложки (iTunes) и жанры (Discogs) перестают падать по rate-limit. Co-Authored-By: Claude Opus 4.8 --- src/enrich/enrichment.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/enrich/enrichment.service.ts b/src/enrich/enrichment.service.ts index 327eb49..f12035e 100644 --- a/src/enrich/enrichment.service.ts +++ b/src/enrich/enrichment.service.ts @@ -17,8 +17,8 @@ export class EnrichmentService { // Очередь обогащения с троттлингом (под лимиты Discogs/iTunes) private readonly queue: string[] = []; private running = false; - private readonly throttleMs = 1000; - private readonly concurrency = 3; + private readonly throttleMs = 1200; + private readonly concurrency = 2; constructor( private readonly prisma: PrismaService,