Skip to content

Commit 9d0ad74

Browse files
committed
Remove now unnessecary check & parameter
Signed-off-by: Mathias L. Baumann <[email protected]>
1 parent cc6e85e commit 9d0ad74

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

src/frequenz/dispatch/_managing_actor.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ async def run():
9797
9898
managing_actor = DispatchManagingActor(
9999
actor=my_actor,
100-
dispatch_type="EXAMPLE",
101100
running_status_receiver=status_receiver,
102101
updates_sender=dispatch_updates_channel.new_sender(),
103102
)
@@ -109,15 +108,13 @@ async def run():
109108
def __init__(
110109
self,
111110
actor: Actor | Set[Actor],
112-
dispatch_type: str,
113111
running_status_receiver: Receiver[Dispatch],
114112
updates_sender: Sender[DispatchUpdate] | None = None,
115113
) -> None:
116114
"""Initialize the dispatch handler.
117115
118116
Args:
119117
actor: A set of actors or a single actor to manage.
120-
dispatch_type: The type of dispatches to handle.
121118
running_status_receiver: The receiver for dispatch running status changes.
122119
updates_sender: The sender for dispatch events
123120
"""
@@ -126,7 +123,6 @@ def __init__(
126123
self._actors: frozenset[Actor] = frozenset(
127124
[actor] if isinstance(actor, Actor) else actor
128125
)
129-
self._dispatch_type = dispatch_type
130126
self._updates_sender = updates_sender
131127

132128
def _start_actors(self) -> None:
@@ -160,10 +156,6 @@ async def _handle_dispatch(self, dispatch: Dispatch) -> None:
160156
Args:
161157
dispatch: The dispatch to handle.
162158
"""
163-
if dispatch.type != self._dispatch_type:
164-
_logger.debug("Ignoring dispatch %s", dispatch.id)
165-
return
166-
167159
if dispatch.started:
168160
if self._updates_sender is not None:
169161
_logger.info("Updated by dispatch %s", dispatch.id)

tests/test_mananging_actor.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ async def test_env() -> AsyncIterator[TestEnv]:
7272

7373
runner_actor = DispatchManagingActor(
7474
actor=actor,
75-
dispatch_type="UNIT_TEST",
7675
running_status_receiver=channel.new_receiver(),
7776
updates_sender=updates_channel.new_sender(),
7877
)

0 commit comments

Comments
 (0)