Repository navigation
fix(sabnzbd): keep failed jobs on the first history page - #993
Merged
javi11 merged 3 commits intoOct 14, 2026
Merged
Conversation
Sonarr and Radarr poll SABnzbd history with start=0 and a fixed limit (DownloadClientHistoryLimit, default 60) and never read a later page. A tracked download that is in neither the queue nor that page is marked untrackable without a downloadFailed event, so the release is never blocklisted and never retried. During a burst of grabs, newer completed rows pushed failed rows off the page before the *arr polled. On start=0 the handler now appends every failed row still kept in import_queue (same category and skip_arr_notification filters, capped at 1000) that the page does not already hold. The page itself, noofslots, later pages and the nzo_ids lookup are unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #992
Sonarr and Radarr poll the SABnzbd history with
start=0and a fixed limit (DownloadClientHistoryLimit, default 60) and never read a later page. A tracked download that is in neither the queue nor that page is marked untrackable without a downloadFailed event, so the release is never blocklisted and never retried. During a burst of grabs, newer completed rows push failed rows off the page before the arr polls.On
start=0the history handler now appends every failed row still kept inimport_queue(same category andskip_arr_notificationfilters, capped at 1000) that the page does not already hold. The page itself,noofslots, later pages and thenzo_idslookup are unchanged.Tests:
TestSABnzbdHistory_FailedRowOnFirstPageDuringBurst: one failed job older than 8 completed jobs,limit=5. Fails on the current code, passes with this change.nzo_idslookup.TestSABnzbdFailedHistory_FiltersAndCapfor the new repository query.We have been running this on our instance since 2026-10-09. After deploying, page 0 for one category carried all 46 failed jobs out of 3541 history rows.