File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed
projects/jupyter-server-ydoc/jupyter_server_ydoc Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -63,17 +63,17 @@ async def clean(self):
6363 # prevent hanging stop process - it also requires some thinking about
6464 # should the ystore write action be cancelled; I guess not as it could
6565 # results in corrupted data.
66- # room_tasks = list()
67- # for name, room in list(self.rooms.items()):
68- # for task in room.background_tasks:
69- # task.cancel() # FIXME should be upstreamed
70- # room_tasks.append(task)
71- # if room_tasks:
72- # _, pending = await asyncio.wait(room_tasks, timeout=3)
73- # if pending:
74- # msg = f"{len(pending)} room task(s) are pending."
75- # self.log.warning(msg)
76- # self.log.debug("Pending tasks: %r", pending)
66+ room_tasks = list ()
67+ for name , room in list (self .rooms .items ()):
68+ for task in room .background_tasks :
69+ task .cancel () # FIXME should be upstreamed
70+ room_tasks .append (task )
71+ if room_tasks :
72+ _ , pending = await asyncio .wait (room_tasks , timeout = 3 )
73+ if pending :
74+ msg = f"{ len (pending )} room task(s) are pending."
75+ self .log .warning (msg )
76+ self .log .debug ("Pending tasks: %r" , pending )
7777
7878 await self .stop ()
7979 tasks = []
You can’t perform that action at this time.
0 commit comments