diff --git a/docs/source/developers/extensions.rst b/docs/source/developers/extensions.rst index 7d1f24e431..e88acfb0f6 100644 --- a/docs/source/developers/extensions.rst +++ b/docs/source/developers/extensions.rst @@ -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 -------------------------------- @@ -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 =============================== diff --git a/jupyter_server/serverapp.py b/jupyter_server/serverapp.py index 036fcd3044..01489e3dc5 100644 --- a/jupyter_server/serverapp.py +++ b/jupyter_server/serverapp.py @@ -3125,7 +3125,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