Skip to content

Commit

Permalink
prefer asyncio.create_task()
Browse files Browse the repository at this point in the history
  • Loading branch information
dlqqq committed Mar 20, 2024
1 parent 1cc9fc3 commit 1296f08
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions jupyter_collaboration/rooms.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,7 @@ async def _maybe_save_document(self) -> None:
# do not write to `self._document` in this `try` block, as that will
# trigger the observer and result in a save loop.
self.log.info("Saving the content from room %s", self._room_id)
loop = asyncio.get_running_loop()
self._save_task = loop.create_task(self._file.maybe_save_content(
self._save_task = asyncio.create_task(self._file.maybe_save_content(
{
"format": self._file_format,
"type": self._file_type,
Expand Down

0 comments on commit 1296f08

Please sign in to comment.