Skip to content

feat: updater circle uses rss_link + HTTP ETag, skips empty channels - #9

Merged
kinton merged 3 commits into
mainfrom
cursor/updater-etag-circle-d56e
Sep 3, 2026
Merged

feat: updater circle uses rss_link + HTTP ETag, skips empty channels#9
kinton merged 3 commits into
mainfrom
cursor/updater-etag-circle-d56e

Conversation

@kinton

@kinton kinton commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

What

The scheduled updater circle uses our channels.rss_link plus HTTP ETag / Last-Modified. Unchanged feeds return 304 and are not downloaded or parsed. Channels with nobody to notify are skipped (no sleep(6)).

Behavior

  • 304 is checked explicitly (Response.ok is true for 304). No XML parse, not gone/unavailable, does not increment feed-failure counters (failures are reset: the feed is reachable).
  • 200 stores the new http_etag / http_last_modified on the channel row (created on SQLighter connect and in db/migrations/00012_channel_http_validators.py).
  • Scheduled path (manual=False): rss_link + stored validators. iTunes lookup only if rss_link is empty.
  • Manual «обновить» still itunes-then-rss; the RSS GET still sends validators.
  • Iterator: live notify=1 user (deleted_at IS NULL, paid or not) or an active tg-channel connection. Empty channels are not slept on. 6s delay remains after a real body download.

Left alone

iTunes search/UI. Outbox. Bot API polling (PR #5). Start/deploy still python main.py / supervisorctl restart yourcast.

Tests

python db/test_channel_poll.py and venv/bin/python app/service/podcast/test_feed_etag.py — temp DBs and mocked HTTP only.

Open in Web Open in Cursor 

@kinton
kinton marked this pull request as ready for review September 3, 2026 10:20
cursoragent and others added 3 commits September 3, 2026 15:39
Add channels.http_etag and http_last_modified, create them on connect if
the hand-applied migration has not run yet, and skip channels that have
nobody to notify (notify=1 on a live user, or an active tg-channel).

Co-authored-by: Kovalenko K. <kintonkk@gmail.com>
The scheduled circle uses our stored rss_link plus If-None-Match /
If-Modified-Since. HTTP 304 is not parsed, not a feed failure, and does
not sleep 6s. iTunes lookup stays the fallback when rss_link is empty
and for the manual update button / search UI.

Co-authored-by: Kovalenko K. <kintonkk@gmail.com>
Temp-file DBs and mocked HTTP only. 304 is not treated as ok-content,
unchanged feeds are not parsed, and channels without live notify
recipients are skipped.

Co-authored-by: Kovalenko K. <kintonkk@gmail.com>
@cursor
cursor Bot force-pushed the cursor/updater-etag-circle-d56e branch from a6329df to e0f5b77 Compare September 3, 2026 15:39
@kinton
kinton merged commit bbd3996 into main Sep 3, 2026
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.

2 participants