Skip to content
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

Redesign managing actor #95

Draft
wants to merge 1 commit into
base: v0.x.x
Choose a base branch
from

Conversation

Marenz
Copy link
Contributor

@Marenz Marenz commented Jan 8, 2025

This way we can always send a status update to a new receiver

This way we can always send a status update to a new receiver

Signed-off-by: Mathias L. Baumann <[email protected]>
@github-actions github-actions bot added the part:dispatcher Affects the high-level dispatcher interface label Jan 8, 2025
running_status_receiver: Receiver[Dispatch],
updates_sender: Sender[DispatchUpdate] | None = None,
actor: Actor | Set[Actor] | None = None,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going for an actor factory. Will submit my WIP as a draft PR so maybe you can get some inspiration about it, or we can discuss pros and cons from the different approaches.

Comment on lines +138 to +144
def new_receiver(self) -> Receiver[DispatchUpdate]:
"""Create a new receiver for dispatch updates.

Returns:
A new receiver for dispatch updates.
"""
return self._updates_channel.new_receiver()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, yes! I also thought about this, but I didn't start to address this but was my next step. I think this actor should also stop being an actor and just be a background service.

I'm not sure it is needed with my approach, but I think it would be convenient anyway, I see no advantages in delegating the creation of the channel to the outside.

@llucax
Copy link
Contributor

llucax commented Jan 8, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
part:dispatcher Affects the high-level dispatcher interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants