File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,6 @@ async def _run(self) -> None:
126126 self ._dispatches .pop (dispatch .id )
127127 await self ._update_dispatch_schedule_and_notify (None , dispatch )
128128
129- dispatch ._set_deleted () # pylint: disable=protected-access
130129 await self ._lifecycle_updates_sender .send (
131130 Deleted (dispatch = dispatch )
132131 )
@@ -221,16 +220,18 @@ async def _update_dispatch_schedule_and_notify(
221220 if not dispatch and old_dispatch :
222221 self ._remove_scheduled (old_dispatch )
223222
223+ was_running = old_dispatch .started
224+ old_dispatch ._set_deleted () # pylint: disable=protected-access)
225+
224226 # If the dispatch was running, we need to notify
225- if old_dispatch . started :
227+ if was_running :
226228 await self ._send_running_state_change (old_dispatch )
227229
228230 # A new dispatch was created
229231 elif dispatch and not old_dispatch :
230232 assert not self ._remove_scheduled (
231233 dispatch
232234 ), "New dispatch already scheduled?!"
233-
234235 # If its currently running, send notification right away
235236 if dispatch .started :
236237 await self ._send_running_state_change (dispatch )
You can’t perform that action at this time.
0 commit comments