feat(#14): make crawl page depth configurable via env vars#21
Merged
Jing-yilin merged 2 commits intodevelopfrom Feb 27, 2026
Merged
feat(#14): make crawl page depth configurable via env vars#21Jing-yilin merged 2 commits intodevelopfrom
Jing-yilin merged 2 commits intodevelopfrom
Conversation
Jing-yilin
commented
Feb 27, 2026
Contributor
Author
Jing-yilin
left a comment
There was a problem hiding this comment.
Gap: the new env vars don't actually let us increase crawl depth, only decrease it. RunCrawlNow() still caps each pass at cat.PageDepth, so CRAWL_DEPTH_NEWEST=20 is still truncated to 10 for roots and 5 for subcategories. That means the advertised runtime override won't deepen the crawl in production. If we want true configurability, the hardcoded per-category ceiling needs to move or be derived from config.
4bef87e to
dcd77b8
Compare
87d5b1e to
487c6e3
Compare
dcd77b8 to
9455426
Compare
Add CRAWL_DEPTH_NEWEST / CRAWL_DEPTH_MAGIC / CRAWL_DEPTH_ENDDATE env vars so page depth can be tuned at runtime without a code change. Defaults: newest=10, magic=5, end_date=3.
487c6e3 to
151e123
Compare
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.
Closes #14
Changes
CRAWL_DEPTH_NEWEST,CRAWL_DEPTH_MAGIC,CRAWL_DEPTH_ENDDATEenv varsStack
PR 3/6. Base: #20 (sort strategies). Next: #15 (parse alerting)