Private
Public Access
An unexpected exception while fetching was recorded and re-raised, then the feed waited for its next scheduled poll — which under error backoff can be hours — even for a locked SQLite file or a dropped database connection that clears in seconds. fetch_feed now retries OperationalError/InterfaceError up to three times with doubling delays (30s, 60s, 120s), holding the feed's claim so the poller can't also fetch it and without counting it against the feed. Anything else, and a transient error after the retries are spent, keep the existing path: record the error, back off, release the claim, re-raise. Time limits are unchanged. Verified with a real Celery worker against a real Redis broker, with the fetch rigged to fail twice: retries fired after 1s and 2s (delays shortened for the probe), the third attempt succeeded, and the feed ended healthy, unclaimed and scheduled. (Celery's eager test mode mishandles retries, so the unit tests mock retry() and assert the countdowns, claim and error-count behavior instead.) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>