Fix pending_completion stuck for stopped downloads deleted locally#272
Fix pending_completion stuck for stopped downloads deleted locally#272nitrobass24 merged 1 commit intodevelopfrom
Conversation
When a stopped download's local files are deleted and auto_delete_remote is enabled, the model builder skips persist authority (to allow re-download), leaving the file in DEFAULT state. Since DEFAULT was not a pending_completion exit condition, the ActiveScanner polled the non-existent path indefinitely. Add an early exit: clear pending_completion when a file is DEFAULT with local_size=None, meaning local files are gone and nothing remains to track. Fixes #271 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a guard condition in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
Summary
pending_completionnever clearing when a stopped download's local files are deleted withauto_delete_remoteenabledDEFAULTwithlocal_size=None, clear frompending_completionsince there's nothing left to trackRoot Cause
When an LFTP job disappears (stop or completion), the file enters
pending_completion. Exit conditions only check for terminal states (DOWNLOADED,DELETED, etc.). But withauto_delete_remote=Trueand remote still present, the model builder skips persist authority, leaving the file inDEFAULT— which wasn't an exit condition. Result: ActiveScanner polls forever.Test plan
Fixes #271
🤖 Generated with Claude Code
Summary by CodeRabbit