File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
jupyter_server_documents/rooms Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ class YRoomManager():
4040 event_logger : EventLogger
4141 loop : asyncio .AbstractEventLoop
4242 log : logging .Logger
43- _watch_rooms_task : asyncio .Task
43+ _watch_rooms_task : asyncio .Task | None
4444
4545 def __init__ (
4646 self ,
@@ -66,7 +66,8 @@ def __init__(
6666
6767 # Start `self._watch_rooms()` background task to automatically stop
6868 # empty rooms
69- self ._watch_rooms_task = self .loop .create_task (self ._watch_rooms ())
69+ # TODO: Do not enable this until #120 is addressed.
70+ # self._watch_rooms_task = self.loop.create_task(self._watch_rooms())
7071
7172
7273 @property
@@ -223,7 +224,8 @@ def stop(self) -> None:
223224 Gracefully deletes each `YRoom`. See `delete_room()` for more info.
224225 """
225226 # First, stop all background tasks
226- self ._watch_rooms_task .cancel ()
227+ if self ._watch_rooms_task :
228+ self ._watch_rooms_task .cancel ()
227229
228230 # Get all room IDs. If there are none, return early.
229231 room_ids = list (self ._rooms_by_id .keys ())
You can’t perform that action at this time.
0 commit comments