forked from Furumi/furumi-web
Let one account use the whole refresh run when others have nothing due
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
62141c0840
commit
0aead73135
7 files changed
+48
-43
No files matched your search
@@ -125,12 +125,13 @@ feeds of subscribed podcasts: each feed about once an hour with conditional
|
||||
requests, failing feeds less and less often (up to once a day). It downloads
|
||||
feed metadata only, never episode audio. A failing feed keeps its known
|
||||
episodes. Accounts subscribed to the same feed share one request. Each run
|
||||
checks at most 200 feeds, taking accounts in turns (at most 25 feeds of one
|
||||
account per run), so an account with many or slow feeds does not delay the
|
||||
others. An account can add up to 1000 subscriptions, and can have two feed
|
||||
downloads ("add RSS", Refresh) and four proxied audio streams in progress at
|
||||
once (16 and 64 for the whole server); beyond that the request is refused
|
||||
with HTTP 429.
|
||||
checks at most 200 feeds (2400 an hour), taking accounts in turns: first the
|
||||
most overdue feed of every account, then the second, and so on. An account
|
||||
with many or slow feeds therefore does not delay the others, but can use the
|
||||
capacity nobody else needs. An account can add up to 1000 subscriptions, and
|
||||
can have two feed downloads ("add RSS", Refresh) and four proxied audio
|
||||
streams in progress at once (16 and 64 for the whole server); beyond that the
|
||||
request is refused with HTTP 429.
|
||||
|
||||
The server therefore makes outgoing HTTP(S) requests to podcast publishers.
|
||||
It only connects to public addresses on the web ports 80, 443, 8080 and 8443:
|
||||
|
||||
+2
-1
@@ -131,7 +131,8 @@ The runtime around the store lives next to it in `src/podcasts/`:
|
||||
15 min × 2ⁿ⁻¹ up to a day (a longer `Retry-After` wins). `refresh_now` is
|
||||
the manual refresh: subscribed podcasts only, at most every 30 s.
|
||||
`jobs/podcast_refresh.rs` runs `refresh_due` every five minutes (200
|
||||
podcasts, 4 requests in flight, one run at a time via an advisory lock).
|
||||
podcasts taken in turns across accounts without a per-account cap, 4
|
||||
requests in flight, one run at a time via an advisory lock).
|
||||
- `proxy.rs` and `http.rs` — the optional audio proxy and the endpoints under
|
||||
`/api/podcasts`. The proxy takes an episode id, loads the URL from the
|
||||
account's catalog (`PodcastStore::audio_source`), forwards a single
|
||||
|
||||
Reference in new issue
Block a user