-
Notifications
You must be signed in to change notification settings - Fork 3
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
Fix running state behavior with delete #41
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.
So the previous behaviour was that a stop event was sent even when there were other dispatches running for this type, so the dispatch would have stopped when it shouldn't, right?
src/frequenz/dispatch/actor.py
Outdated
@@ -65,6 +65,7 @@ def __init__( | |||
|
|||
self._client = client | |||
self._dispatches: dict[int, Dispatch] = {} | |||
self._dispatch_type_ids_map: dict[str, list[int]] = {} |
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 add documentation about what this is for, as it is not trivial to figure it out.
correct |
When a dispatch is deleted, the running state change notification telling the actor that it is no longer running will only be sent if there are no other dispatches of the same type running. Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
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 think we should not apply this, as if we need to be able to handle overlapping dispatches that have different parameters, we don't get notified when one of these dispatches should stop.
When a dispatch is deleted, the running state change notification telling the actor that it is no longer running will only be sent if there are no other dispatches of the same type running.
Signed-off-by: Mathias L. Baumann mathias.baumann@frequenz.com