Skip to content

Commit e966a3c

Browse files
committed
docs: add note that startup banner displays before async tasks begin
1 parent a2b6920 commit e966a3c

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

docs/source/developers/extensions.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ Here is basic example:
8787
"""
8888
await asyncio.sleep(.1)
8989
90+
.. 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.
91+
92+
.. WARNING: This note is also present in the "Starting asynchronous tasks from an ExtensionApp" section.
93+
If you update it here, please update it there as well.
9094
9195
Making an extension discoverable
9296
--------------------------------
@@ -386,6 +390,11 @@ Here is a basic (pseudo) code example:
386390
async def stop_extension(self):
387391
self.my_background_task.cancel()
388392
393+
.. 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.
394+
395+
.. WARNING: This note is also present in the "Starting asynchronous tasks from an extension" section.
396+
If you update it here, please update it there as well.
397+
389398
390399
Distributing a server extension
391400
===============================

jupyter_server/serverapp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3126,7 +3126,7 @@ def start_app(self) -> None:
31263126
" %s" % self.display_url,
31273127
]
31283128

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

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

0 commit comments

Comments
 (0)