Add CLI and programmatic utility to clear the docket#142
Merged
chrisguidry merged 6 commits intomainfrom Jun 20, 2025
Merged
Conversation
|
📚 Documentation has been built for this PR! You can download the documentation directly here: |
## Summary - Adds detailed development commands (testing, linting, type checking) - Documents core architecture including Docket/Worker classes and dependency injection system - Explains Redis data model and task lifecycle - Provides project structure overview and CLI usage examples This expanded documentation will help future Claude Code instances work more effectively in this codebase by understanding the distributed task queue architecture and development workflow. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <noreply@anthropic.com>
Add pragma: no cover to Valkey-specific code paths that are not executed in the default test environment. Also add --cov-fail-under=100 to CI to ensure coverage regressions are caught automatically. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #142 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 27 28 +1
Lines 3358 3561 +203
Branches 190 191 +1
==========================================
+ Hits 3358 3561 +203
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Ensures that docket.clear() properly cleans up all Redis keys without leaking data structures by verifying key count before and after clearing. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Add type: ignore comments to handle Redis keys() method's partial type information in pyright strict mode while preserving type safety with cast annotations. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
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
Closes #119 by adding both programmatic and CLI utilities to clear all pending and scheduled tasks from a docket.
async clear()method onDocketclassdocket clearcommand accessible via CLIImplementation Details
XTRIMwithapproximate=Falseto clear stream messages while preserving consumer groups🤖 Generated with Claude Code