Skip to content

Adaptive show crawler + Refresh button (0.5.0) - #78

Merged
sh1pt-actions-fleet[bot] merged 1 commit into
masterfrom
feat/adaptive-crawl
Oct 29, 2026
Merged

sh1pt-actions-fleet[bot] merged 1 commit into
masterfrom
feat/adaptive-crawl

Conversation

@sh1pt-actions-fleet

Copy link
Copy Markdown
Contributor

Every list on p0dcasters sorted by the dump's newest-episode date, which lagged days (TWiT showed 10-19 on 10-29). The daemon now crawls every listed show on its own rhythm with the shared cadence from @profullstack/scraper-daemon@0.3.0 (daemon.feeds()), same module as rssamplifier.com:

  • 15 min for an hourly show, ~6 h around a weekly show's release day, up to a week when quiet; silent 180 days = archived (kept, read once a quarter, 2% of the queue).
  • Hot tiers first, 4 reads per host (anchor.fm is 116k shows), conditional GETs (etag / last-modified), error ladder, a 429 holds the host.
  • feed_state keyed by feed_url survives the dump reload; a shows-seed job (30 min) adds new shows, drops delisted ones and re-applies crawl dates onto freshly loaded rows.
  • Refresh button on show pages -> POST /api/episodes/<slug>/refresh: drops the cached episodes, reads the feed, moves the show to the front of the crawler queue.
  • CRAWL_CONCURRENCY (default 24, 0 turns the crawler off).

Tests: 89 pass (incl. a real-Postgres feed_state suite with TEST_DATABASE_URL), tsc clean.

🤖 Generated with Claude Code

The directory's newest-episode dates came only from the Podcast Index dump, so
every list lagged by days (TWiT showed 10-19 on 10-29). The daemon now reads
every listed show's feed on its own rhythm via @profullstack/scraper-daemon
0.3.0 daemon.feeds(): 15 min for an hourly show, ~6 h around a weekly show's
release day, up to a week when quiet; silent 180 days = archived (read once a
quarter). Hot tiers first, 4 per host, conditional GETs, error ladder, 429
holds the host.

- feed_state (keyed by feed_url, survives reloads); shows-seed job every 30 min
  adds new shows, drops delisted ones, re-applies crawl dates after a reload
- each read moves podcasts.newest_pubdate / latest_audio / episode_count forward
- POST /api/episodes/<slug>/refresh + Refresh button: fresh episodes now, show
  to the front of the crawler queue

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sh1pt-actions-fleet
sh1pt-actions-fleet Bot merged commit 029f532 into master Oct 29, 2026
2 checks 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