File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -83,19 +83,20 @@ def __init__(
83
83
running_state_change_synced ,
84
84
)
85
85
86
- def set_deleted (self ) -> None :
86
+ def _set_deleted (self ) -> None :
87
87
"""Mark the dispatch as deleted."""
88
88
object .__setattr__ (self , "deleted" , True )
89
89
90
- def running_status_notified (self ) -> bool :
90
+ @property
91
+ def _running_status_notified (self ) -> bool :
91
92
"""Check that the latest running state change notification was sent.
92
93
93
94
Returns:
94
95
True if the latest running state change notification was sent, False otherwise.
95
96
"""
96
97
return self .running_state_change_synced == self .update_time
97
98
98
- def set_running_status_notified (self ) -> None :
99
+ def _set_running_status_notified (self ) -> None :
99
100
"""Mark the latest running state change notification as sent."""
100
101
object .__setattr__ (self , "running_state_change_synced" , self .update_time )
101
102
Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ async def _fetch(self) -> None:
119
119
120
120
for dispatch in old_dispatches .values ():
121
121
_logger .info ("Deleted dispatch: %s" , dispatch )
122
- dispatch .set_deleted ()
122
+ dispatch ._set_deleted () # pylint: disable=protected-access
123
123
await self ._lifecycle_updates_sender .send (Deleted (dispatch = dispatch ))
124
124
if task := self ._scheduled .pop (dispatch .id , None ):
125
125
task .cancel ()
@@ -214,7 +214,8 @@ def _running_state_change(
214
214
assert updated_dispatch is not None
215
215
216
216
# Client was not informed about the dispatch, do it now
217
- if not updated_dispatch .running_status_notified ():
217
+ # pylint: disable=protected-access
218
+ if not updated_dispatch ._running_status_notified :
218
219
return True
219
220
220
221
# Deleted dispatch
@@ -252,4 +253,4 @@ async def _send_running_state_change(self, dispatch: Dispatch) -> None:
252
253
await self ._running_state_change_sender .send (dispatch )
253
254
# Update the last sent notification time
254
255
# so we know if this change was already sent
255
- dispatch .set_running_status_notified ()
256
+ dispatch ._set_running_status_notified () # pylint: disable=protected-access
You can’t perform that action at this time.
0 commit comments