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 2c4e16a commit cd5bf23Copy full SHA for cd5bf23
src/frequenz/dispatch/_dispatch.py
@@ -117,6 +117,10 @@ def running(self, type_: str) -> RunningState:
117
if not self.active or self.deleted:
118
return RunningState.STOPPED
119
120
+ # A dispatch without duration is always running
121
+ if self.duration is None:
122
+ return RunningState.RUNNING
123
+
124
now = datetime.now(tz=timezone.utc)
125
if until := self._until(now):
126
return RunningState.RUNNING if now < until else RunningState.STOPPED
0 commit comments