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 432b3cb commit bcd5c0fCopy full SHA for bcd5c0f
src/frequenz/dispatch/_dispatch.py
@@ -119,11 +119,11 @@ def running(self, type_: str) -> RunningState:
119
120
now = datetime.now(tz=timezone.utc)
121
122
+ if now < self.start_time:
123
+ return RunningState.STOPPED
124
# A dispatch without duration is always running once it started
125
if self.duration is None:
- if self.start_time <= now:
- return RunningState.RUNNING
126
- return RunningState.STOPPED
+ return RunningState.RUNNING
127
128
if until := self._until(now):
129
return RunningState.RUNNING if now < until else RunningState.STOPPED
0 commit comments