We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f3b1103 commit 1509e1bCopy full SHA for 1509e1b
src/frequenz/dispatch/actor.py
@@ -266,10 +266,11 @@ def _schedule_start(self, dispatch: Dispatch) -> None:
266
return
267
268
# Schedule the next run
269
- next_run = dispatch.next_run
270
- assert next_run is not None
271
- heappush(self._scheduled_events, (next_run, dispatch))
272
- _logger.debug("Scheduled dispatch %s to start at %s", dispatch, next_run)
+ if next_run := dispatch.next_run:
+ heappush(self._scheduled_events, (next_run, dispatch))
+ _logger.debug("Scheduled dispatch %s to start at %s", dispatch.id, next_run)
+ else:
273
+ _logger.debug("Dispatch %s has no next run", dispatch.id)
274
275
def _schedule_stop(self, dispatch: Dispatch) -> None:
276
"""Schedule a dispatch to stop.
0 commit comments