Skip to content

Commit

Permalink
fixup! Rewrite internal arc
Browse files Browse the repository at this point in the history
  • Loading branch information
Marenz committed Sep 23, 2024
1 parent f3b1103 commit 1509e1b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/frequenz/dispatch/actor.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,11 @@ def _schedule_start(self, dispatch: Dispatch) -> None:
return

# Schedule the next run
next_run = dispatch.next_run
assert next_run is not None
heappush(self._scheduled_events, (next_run, dispatch))
_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:
_logger.debug("Dispatch %s has no next run", dispatch.id)

def _schedule_stop(self, dispatch: Dispatch) -> None:
"""Schedule a dispatch to stop.
Expand Down

0 comments on commit 1509e1b

Please sign in to comment.