fix: cap pagination per cron run to prevent CPU time limit#33
Merged
liplus-lin-lay merged 1 commit intomainfrom Apr 5, 2026
Merged
fix: cap pagination per cron run to prevent CPU time limit#33liplus-lin-lay merged 1 commit intomainfrom
liplus-lin-lay merged 1 commit intomainfrom
Conversation
fetchAllIssues に maxPages パラメータを追加し、1回の cron 実行で 取得するページ数を MAX_PAGES_PER_RUN=5(500件)に制限。 900+ issue のリポジトリで初回同期時に Cloudflare Worker の CPU 時間制限を超過する問題を解決する。 ページ上限到達時は watermark を pollStartTime ではなく 最後に取得した issue の updated_at に設定し、次回 cron で 続きから取得できるようにした。 Refs #30 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
github-rag-mcp | 2caab52 | Apr 05 2026, 01:50 PM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #30
初回同期時に 900+ issue のリポジトリで GitHub API 全件取得 + IssueStore upsert が Cloudflare Worker の CPU 時間制限を超過する問題を修正。
MAX_PAGES_PER_RUN = 5定数を追加(1回の cron で最大500件)fetchAllIssuesにmaxPagesパラメータとcappedフラグを追加updated_atに設定し、次回 cron で続きから取得