Skip to content

Commit 1296f08

Browse files
committed
prefer asyncio.create_task()
1 parent 1cc9fc3 commit 1296f08

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

jupyter_collaboration/rooms.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,7 @@ async def _maybe_save_document(self) -> None:
249249
# do not write to `self._document` in this `try` block, as that will
250250
# trigger the observer and result in a save loop.
251251
self.log.info("Saving the content from room %s", self._room_id)
252-
loop = asyncio.get_running_loop()
253-
self._save_task = loop.create_task(self._file.maybe_save_content(
252+
self._save_task = asyncio.create_task(self._file.maybe_save_content(
254253
{
255254
"format": self._file_format,
256255
"type": self._file_type,

0 commit comments

Comments
 (0)