Skip to content

Commit

Permalink
docs: add note that startup banner displays before async tasks begin
Browse files Browse the repository at this point in the history
  • Loading branch information
Darshan808 committed Feb 13, 2025
1 parent a2b6920 commit e966a3c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions docs/source/developers/extensions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ Here is basic example:
"""
await asyncio.sleep(.1)
.. note:: The server startup banner (displaying server info and access URLs) is printed before starting asynchronous tasks, so those tasks might still be running even after the banner appears.

.. WARNING: This note is also present in the "Starting asynchronous tasks from an ExtensionApp" section.
If you update it here, please update it there as well.
Making an extension discoverable
--------------------------------
Expand Down Expand Up @@ -386,6 +390,11 @@ Here is a basic (pseudo) code example:
async def stop_extension(self):
self.my_background_task.cancel()
.. note:: The server startup banner (displaying server info and access URLs) is printed before starting asynchronous tasks, so those tasks might still be running even after the banner appears.

.. WARNING: This note is also present in the "Starting asynchronous tasks from an extension" section.
If you update it here, please update it there as well.
Distributing a server extension
===============================
Expand Down
2 changes: 1 addition & 1 deletion jupyter_server/serverapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -3126,7 +3126,7 @@ def start_app(self) -> None:
" %s" % self.display_url,
]

self.log.critical("\nDP_DAI2\n"+"\n".join(message))
self.log.critical("\n".join(message))

async def _cleanup(self) -> None:
"""General cleanup of files, extensions and kernels created
Expand Down

0 comments on commit e966a3c

Please sign in to comment.