[NEEDS CODE REVIEWER] fix: Skip stale queue items during unmonitored checks - #371
Merged
Conversation
lolimmlost
approved these changes
Jul 13, 2026
lolimmlost
left a comment
Collaborator
There was a problem hiding this comment.
Treating stale 404s as "monitored" is the right safe default -- preserves the shared-download guard (won't remove unless ALL queue items are verified unmonitored). Re-raise on non-404 is correct.
Non-blocking: make_request logs at ERROR before re-raising, so a stale 404 produces both an ERROR from make_request and a WARNING from the new handler. The ERROR is misleading since the situation is handled. Not worth changing is_monitored for this PR, but worth noting if the noise becomes a problem.
LGTM.
jrhager84
force-pushed
the
fix/issue-341-stale-queue
branch
from
July 13, 2026 22:11
20f9923 to
105584a
Compare
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.
Summary
Prevents a stale queue item from crashing Decluttarr when its referenced detail item no longer exists in the configured Arr instance.
404returned while checking monitored status as a stale queue recordCloses #341
Test plan
404is skippedpytest tests/jobs/test_remove_unmonitored.py tests/settings/test_instances.py tests/jobs/test_job_manager.py