fix(sync): the stored RSS warning says what the API fallback read
An INFO line outside a request never reaches log_events, so the fallback's own summary was invisible in the Server log. Its counts ride on the sync.rss.failed warning, the one line of a poll the console keeps. Measured on localdev: 375 of 375 dark channels read, 403 new videos.
This commit is contained in:
@@ -152,16 +152,22 @@ def run_rss_poll(db: Session, channels: list[Channel] | None = None) -> dict[str
|
||||
progress.report(done, total, "rss_poll")
|
||||
fallback = run_feed_fallback(db, unread)
|
||||
if failed:
|
||||
# The fallback's count rides on this line because this is the one the stored log keeps (an
|
||||
# INFO line outside a request never reaches `log_events`): the console should show whether
|
||||
# the uploads came in another way.
|
||||
log.warning(
|
||||
"RSS poll: %d/%d channels could not be polled",
|
||||
"RSS poll: %d/%d channels could not be polled; %d read through the API instead",
|
||||
failed,
|
||||
total,
|
||||
fallback["read"],
|
||||
extra=logs.event(
|
||||
"sync.rss.failed",
|
||||
failed=failed,
|
||||
total=total,
|
||||
reasons=dict(reasons),
|
||||
examples=examples,
|
||||
fallback_read=fallback["read"],
|
||||
fallback_new=fallback["new"],
|
||||
),
|
||||
)
|
||||
if total and failed == total:
|
||||
|
||||
Reference in New Issue
Block a user