Skip to content

fix: keep year-search outages inside worker loop - #528

Draft
cursor[bot] wants to merge 1 commit into
masterfrom
cursor/critical-bug-resolution-8d38
Draft

fix: keep year-search outages inside worker loop#528
cursor[bot] wants to merge 1 commit into
masterfrom
cursor/critical-bug-resolution-8d38

Conversation

@cursor

@cursor cursor Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Prevent Radarr/Sonarr year discovery failures from escaping run_search_loop and terminating the search worker.
  • Restore reuse of the year list across loop iterations, avoiding a full Arr library scan on every iteration.
  • Add a regression test proving an Arr API outage triggers the standard 300-second in-process backoff instead of a critical worker crash.

Testing

  • Added or updated automated tests
  • Performed manual verification (describe below)
  • Not applicable (explain why)

Manual test notes:

QBITRR_OVERRIDES_DATA_PATH=/workspace/.config python3 -m unittest discover -s tests — 394 passed. python3 -m pre_commit run --files qBitrr/arss/arr_base.py tests/test_search_and_db_query_hooks.py — passed.

Checklist

  • Linked the related issue or discussed scope with maintainers
  • Ran linters / formatting tools relevant to the touched code
  • Updated documentation or release notes where it makes sense
  • Confirmed there are no sensitive secrets or credentials committed

Additional Notes

No documentation change is needed: this restores the documented year-search behavior and existing outage-recovery contract. The regression was introduced by PR #524 when get_year_search() moved to every loop iteration outside the recovery boundary. With default SearchByYear=true, an Arr outage could exhaust the default five process restarts in 300 seconds and leave automated searches stopped until qBitrr restarted.

Open in Web View Automation 

Co-authored-by: Feramance <Feramance@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant