Fix missing DelayQueue key tracking in register_task#1116
Fix missing DelayQueue key tracking in register_task#1116S0nee wants to merge 1 commit intomagicblock-labs:masterfrom
Conversation
… DelayQueue Context `unregister_task` previously removed a task only from the database, and from the `DelayQueue` only via `process_cancel_request`. This made the API incomplete and could lead to desynchronization and “zombie tasks.” Changes `unregister_task:` now accepts `&mut self` removes the task from both the DelayQueue and the database the duplicate `remove_task_from_queue` has been removed from process_cancel_request the fallback (if the task is not in the database) has been preserved
|
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)
📝 WalkthroughWalkthroughThe service module refactors task removal and queue management logic. The ✨ Finishing Touches🧪 Generate unit tests (beta)
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
register_taskinserted tasks intoDelayQueuewithout storing their keys intask_queue_keys.This broke cancellation and update logic:
Changes:
unregister_taskto also remove fromDelayQueueResult:
Compatibility
Testing
Checklist
Summary by CodeRabbit