Skip to content

Commit d3b7932

Browse files
committed
Rename DispatchActor to DispatchingActor
This is to follow the current actors naming convention. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 4b62a78 commit d3b7932

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/frequenz/dispatch/_dispatcher.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from frequenz.client.dispatch.types import Dispatch
1212

1313
from frequenz.dispatch._event import DispatchEvent
14-
from frequenz.dispatch.actor import DispatchActor
14+
from frequenz.dispatch.actor import DispatchingActor
1515

1616
ReceivedT = TypeVar("ReceivedT")
1717
"""The type being received."""
@@ -77,7 +77,7 @@ def __init__(
7777
"""
7878
self._ready_channel = Broadcast[Dispatch]("ready_dispatches")
7979
self._updated_channel = Broadcast[DispatchEvent]("new_dispatches")
80-
self._actor = DispatchActor(
80+
self._actor = DispatchingActor(
8181
microgrid_id,
8282
grpc_channel,
8383
svc_addr,

src/frequenz/dispatch/actor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"""To map from our Weekday enum to the dateutil library enum."""
5757

5858

59-
class DispatchActor(Actor):
59+
class DispatchingActor(Actor):
6060
"""Dispatch actor.
6161
6262
This actor is responsible for handling dispatches for a microgrid.

tests/test_frequenz_dispatch.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from pytest import fixture
2121

2222
from frequenz.dispatch import Created, Deleted, DispatchEvent, Updated
23-
from frequenz.dispatch.actor import DispatchActor
23+
from frequenz.dispatch.actor import DispatchingActor
2424

2525

2626
# This method replaces the event loop for all tests in the file.
@@ -50,7 +50,7 @@ def _now() -> datetime:
5050
class ActorTestEnv:
5151
"""Test environment for the actor."""
5252

53-
actor: DispatchActor
53+
actor: DispatchingActor
5454
"""The actor under test."""
5555
updated_dispatches: Receiver[DispatchEvent]
5656
"""The receiver for updated dispatches."""
@@ -85,7 +85,7 @@ async def send(self, msg: T) -> None:
8585
ready_dispatches = Broadcast[Dispatch]("ready_dispatches")
8686
microgrid_id = randint(1, 100)
8787

88-
actor = DispatchActor(
88+
actor = DispatchingActor(
8989
microgrid_id=microgrid_id,
9090
grpc_channel=MagicMock(),
9191
svc_addr="localhost",
@@ -223,7 +223,7 @@ async def test_dispatch_schedule(
223223
await actor_env.client.create(**to_create_params(sample))
224224
dispatch = actor_env.client.dispatches[0]
225225

226-
next_run = DispatchActor.calculate_next_run(dispatch, _now())
226+
next_run = DispatchingActor.calculate_next_run(dispatch, _now())
227227
assert next_run is not None
228228

229229
fake_time.shift(next_run - _now() - timedelta(seconds=1))

0 commit comments

Comments
 (0)