Skip to content

feat(#14): make crawl page depth configurable via env vars#21

Merged
Jing-yilin merged 2 commits intodevelopfrom
feature/14-page-depth
Feb 27, 2026
Merged

feat(#14): make crawl page depth configurable via env vars#21
Jing-yilin merged 2 commits intodevelopfrom
feature/14-page-depth

Conversation

@Jing-yilin
Copy link
Contributor

Closes #14

Changes

  • Add CRAWL_DEPTH_NEWEST, CRAWL_DEPTH_MAGIC, CRAWL_DEPTH_ENDDATE env vars
  • Defaults: 10 / 5 / 3 — same as before, zero code-change required for existing deploys

Stack

PR 3/6. Base: #20 (sort strategies). Next: #15 (parse alerting)

Copy link
Contributor Author

@Jing-yilin Jing-yilin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Jing-yilin Jing-yilin force-pushed the feature/13-sort-strategies branch from 4bef87e to dcd77b8 Compare February 27, 2026 10:26
@Jing-yilin Jing-yilin force-pushed the feature/14-page-depth branch from 87d5b1e to 487c6e3 Compare February 27, 2026 10:26
@Jing-yilin Jing-yilin force-pushed the feature/13-sort-strategies branch from dcd77b8 to 9455426 Compare February 27, 2026 10:27
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.
@Jing-yilin Jing-yilin force-pushed the feature/14-page-depth branch from 487c6e3 to 151e123 Compare February 27, 2026 10:29
@Jing-yilin Jing-yilin changed the base branch from feature/13-sort-strategies to develop February 27, 2026 10:29
@Jing-yilin Jing-yilin merged commit 12409a9 into develop Feb 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant