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 7324eda commit d1c9f37Copy full SHA for d1c9f37
src/frequenz/dispatch/_bg_service.py
@@ -184,7 +184,13 @@ async def new_running_state_event_receiver(
184
185
Returns:
186
A new receiver for running state status.
187
+
188
+ Raises:
189
+ RuntimeError: If the dispatch service is not running.
190
"""
191
+ if not self._tasks:
192
+ raise RuntimeError("Dispatch service not started")
193
194
# Find all matching dispatches based on the type and collect them
195
dispatches = [
196
dispatch for dispatch in self._dispatches.values() if dispatch.type == type
0 commit comments