fix: synchronize bounded Servarr download queues - #3535
constbogdan wants to merge 6 commits into
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (10)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe change adds configurable Radarr and Sonarr download queue limits. Servarr APIs now paginate queue retrieval and poll refresh commands. DownloadTracker coordinates bounded, deduplicated updates and scheduled errors are logged. ChangesDownload queue configuration
Servarr API behavior
Download synchronization
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~45 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant DownloadSyncJob
participant DownloadTracker
participant RadarrAPI
participant SonarrAPI
DownloadSyncJob->>DownloadTracker: updateDownloads()
DownloadTracker->>RadarrAPI: refresh and fetch bounded queue
DownloadTracker->>SonarrAPI: refresh and fetch bounded queue
RadarrAPI-->>DownloadTracker: queue data
SonarrAPI-->>DownloadTracker: queue data
DownloadTracker-->>DownloadSyncJob: complete or reject
Suggested reviewers: Merge Risk: ⚪ Minimal · up to The PR bounds and paginates Servarr queue retrieval, waits for refresh commands, and coordinates deduplicated Radarr/Sonarr synchronization. Supplied evidence covers the changed behavior and failure paths, with no actionable merge-blocking risk remaining. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit sets the queue to ten, Comment |
Description
Continues the work originally proposed in #1055, preserving Mavyre's original commit authorship, and incorporates the additional queue synchronization fixes previously submitted in #3473.
This change:
RefreshMonitoredDownloadscommand to complete before reading the queue;The queue limit only controls how many active queue items Seerr retrieves and tracks during Download Sync. It does not affect Sonarr/Radarr download processing.
Mavyre confirmed in #1055 that opening a new PR referencing the original work was welcome.
References #1055.
Supersedes #3473.
How Has This Been Tested?
Automated validation:
pnpm buildpassed.pnpm lintpassed with 19 pre-existing warnings in untouched files.pnpm format:checkpassed.pnpm i18n:extractpassed.git diff --checkpassed.Live integration testing was also performed using a local Seerr development instance connected to real Sonarr and Radarr services.
Observed queue behavior:
The Radarr and Sonarr settings UI, validation, Advanced tooltip, and queue-size configuration were also tested manually.
Screenshots / Logs (if applicable)
Checklist:
pnpm buildpnpm i18n:extractAI Assistance Notice
AI assistance was used during implementation, review, and test preparation. All resulting changes were manually reviewed and validated with the automated and live integration tests described above.
Summary by CodeRabbit
New Features
Bug Fixes