From 93acee24c59d4665f72a0a84511a62fbb8821f22 Mon Sep 17 00:00:00 2001 From: liplus-lin-lay Date: Sun, 5 Apr 2026 23:56:19 +0900 Subject: [PATCH] fix: reduce MAX_PAGES_PER_RUN to 2 to avoid CPU limit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 500件/回 (5ページ) でも liplus-language (900+ issue) の初回同期で CPU 時間制限を超過し続けていた。200件/回 (2ページ) に縮小。 Refs #30 --- src/poller.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/poller.ts b/src/poller.ts index cf2b618..b7dde06 100644 --- a/src/poller.ts +++ b/src/poller.ts @@ -37,10 +37,10 @@ const MAX_EMBEDDINGS_PER_RUN = 50; /** Maximum number of API pages to fetch per single cron run. * Prevents Cloudflare Worker CPU time limit on large repos (e.g. 900+ issues initial sync). - * At PER_PAGE=100, this caps a single run at 500 issues. + * At PER_PAGE=100, this caps a single run at 200 issues. * When capped, the watermark is set to the last fetched issue's updated_at * so the next cron continues from where it left off. */ -const MAX_PAGES_PER_RUN = 5; +const MAX_PAGES_PER_RUN = 2; /** * Compute SHA-256 hash of title + body for change detection.