-
Couldn't load subscription status.
- Fork 5
Add support to restart a stream #141
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
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.
Pull Request Overview
This PR adds support for restarting streams by introducing a reconnect mechanism that cancels the current task and starts a new one.
- Added a reconnect() method in streaming.py to cancel and reinitialize the streaming task.
- Updated RELEASE_NOTES.md to document the new stream restart functionality.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/frequenz/client/base/streaming.py | Added reconnect() to handle stream restarts |
| RELEASE_NOTES.md | Updated release notes to include restart support note |
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.
This also needs some tests.
| limit=maxsize, warn_on_overflow=warn_on_overflow | ||
| ) | ||
|
|
||
| def reconnect(self) -> None: |
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.
I would call this restart_stream() for extra clarity.
Co-authored-by: Copilot <[email protected]> Signed-off-by: Mathias L. Baumann <[email protected]>
Should probably use frequenz-floss/frequenz-client-base-python#141 eventually to be less hacky?
No description provided.