-
Couldn't load subscription status.
- Fork 6
Fetch only ongoing dispatches #195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR optimizes the dispatch fetching functionality by filtering out completed dispatches, fetching only ongoing ones to improve performance and relevance.
- Adds an
end_fromparameter to the dispatch client API call to filter out past dispatches - Updates tests to handle the new behavior where finished dispatches are filtered out
- Temporarily uses a development version of the frequenz-client-dispatch dependency
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| src/frequenz/dispatch/_bg_service.py | Adds time-based filtering to only fetch ongoing dispatches using end_from parameter |
| tests/test_frequenz_dispatch.py | Updates test expectations and adds logging to handle the new filtering behavior |
| pyproject.toml | Temporarily switches to development branch of frequenz-client-dispatch dependency |
| RELEASE_NOTES.md | Documents the new optimization feature |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
03a8d6a to
ea7fe7d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Signed-off-by: Mathias L. Baumann <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, LGTM, no approving only because of the PR dependency.
Based on frequenz-floss/frequenz-client-dispatch-python#212