Sleep until the next feed is due instead of scanning every minute (#114)
The daemon ticked every 60 s and ran a scan pass each time: the sweep, then a check-state query per feed (about 180) to find which were due. In the six hours before, 293 of 362 passes found nothing due. Now, after each pass, it works out when the earliest feed is due (due_at, shared with the scan's own check, over Db::http_states, one query) and sleeps until then: at least 30 s, so a feed that never gets a check time cannot spin it, and at most 10 minutes, so what no command announces, ipx add or a shorter schedule, is picked up. Commands still wake it at once, and the first pass after starting runs straight away, as the tick's did. The scan reads every feed's state in one query too. The prod-check skill says what to expect now: tens of scans in six hours, and pending as the real queue. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
### Changed
|
||||
|
||||
- The daemon sleeps until the next feed is due, at most ten minutes, instead of looking every minute; refreshing or adding a feed still wakes it at once.
|
||||
- A pinned feed's pin sits on the corner of its artwork, as a failing feed's mark does, instead of before its name.
|
||||
- The Directory lists feeds nobody subscribes to yet; Popular still lists what people subscribe to.
|
||||
A feed nobody subscribes to is checked once a day, and at once when someone subscribes. A
|
||||
|
||||
Reference in New Issue
Block a user