Skip to content

Commit 2b7f7fd

Browse files
committed
Make dispatch receiving less chatty/verbose
Signed-off-by: Mathias L. Baumann <[email protected]>
1 parent 9d0ad74 commit 2b7f7fd

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* Two properties have been replaced by methods that require a type as parameter.
1010
* `Dispatcher.lifecycle_events` has been replaced by the method `Dispatcher.new_lifecycle_events_receiver(self, dispatch_type: str)`.
1111
* `Dispatcher.running_status_change` has been replaced by the method `Dispatcher.new_running_state_event_receiver(self, dispatch_type: str, unify_running_intervals: bool)`.
12+
* The managing actor constructor no longer requires the `dispatch_type` parameter. Instead you're expected to pass the type to the new-receiver function.
1213

1314
## New Features
1415

src/frequenz/dispatch/_bg_service.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,16 +259,18 @@ async def _fetch(self) -> None:
259259
self._dispatches[dispatch.id] = Dispatch(client_dispatch)
260260
old_dispatch = old_dispatches.pop(dispatch.id, None)
261261
if not old_dispatch:
262-
_logger.info("New dispatch: %s", dispatch)
262+
_logger.debug("New dispatch: %s", dispatch)
263263
await self._update_dispatch_schedule_and_notify(dispatch, None)
264264
await self._lifecycle_events_tx.send(Created(dispatch=dispatch))
265265
elif dispatch.update_time != old_dispatch.update_time:
266-
_logger.info("Updated dispatch: %s", dispatch)
266+
_logger.debug("Updated dispatch: %s", dispatch)
267267
await self._update_dispatch_schedule_and_notify(
268268
dispatch, old_dispatch
269269
)
270270
await self._lifecycle_events_tx.send(Updated(dispatch=dispatch))
271271

272+
_logger.info("Received %s dispatches", len(self._dispatches))
273+
272274
except grpc.aio.AioRpcError as error:
273275
_logger.error("Error fetching dispatches: %s", error)
274276
self._dispatches = old_dispatches

0 commit comments

Comments
 (0)