Subscribing wakes the Signals judge, so a known feed's items reach Signals at once (#415)
The judge woke for a scan's new items and for changes to Signals, and otherwise every five minutes. A feed the server already had brings no new items when someone subscribes, so its recent items waited for the next idle pass before the new subscriber's Signals saw them. The browser test for a Signal's new hits ran into this whenever an earlier test had subscribed to the same fixture feed and left: it waited 20 s and failed in the full suite, passing alone. scan_soon, which every subscribe from the API calls, wakes it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RqkrVDqdiQEMWAkNGQ2tYA
This commit is contained in:
@@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
### Fixed
|
||||
|
||||
- Subscribing to a feed someone here already reads puts its recent items to your Signals at once, rather than at the judge's next pass, up to five minutes later (#415).
|
||||
- A download a restart stopped, a deploy's for one, is taken up again as the daemon starts, rather than waiting for its feed's next check, an hour or a day away (#410).
|
||||
- A YouTube channel no longer misses most days' videos: YouTube answers some feed requests with a 404 or 500 it does not mean, and ipx now asks again, twice, a second apart, before calling the feed failing (#382), and then every hour for a day where it would have waited a day, since YouTube's failures run for hours; and its YouTube feeds are read one at a time, two seconds apart, since YouTube refuses many asked together (#386).
|
||||
- Syncing an OPML or Patreon list reads who subscribes to it once, not once for every feed it lists: a list of 922 was thousands of the same queries a sync (#377).
|
||||
|
||||
@@ -2127,6 +2127,9 @@ async fn add_feed(
|
||||
/// `None` scans whatever is due, which a feed never checked always is. The add has
|
||||
/// succeeded either way, so a daemon not taking commands is only logged.
|
||||
async fn scan_soon(state: &WebState, feed: Option<String>) {
|
||||
// A feed the server already has brings no new items to wake the Signals judge, and its recent
|
||||
// ones waited up to five minutes for the next pass to reach the new subscriber's Signals (#415).
|
||||
state.ctx.signals.notify_one();
|
||||
let force = feed.is_some();
|
||||
if state.cmds.send(Command::Fetch { feed, force, feeds: vec![] }).await.is_err() {
|
||||
tracing::warn!("could not queue a scan: the daemon is not accepting commands");
|
||||
|
||||
Reference in New Issue
Block a user