-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop / unload / cleanup hook for a server extension #241
Comments
Looks like the jupyter_server/jupyter_server/extension/application.py Lines 419 to 423 in 3343101
|
oliver-sanders
added a commit
to oliver-sanders/jupyter_server
that referenced
this issue
May 21, 2021
* closes jupyter-server#241 * call a stop_extension method on server shutdown if present
oliver-sanders
added a commit
to oliver-sanders/jupyter_server
that referenced
this issue
May 21, 2021
* closes jupyter-server#241 * call a stop_extension method on server shutdown if present
oliver-sanders
added a commit
to oliver-sanders/jupyter_server
that referenced
this issue
May 21, 2021
* closes jupyter-server#241 * call a stop_extension method on server shutdown if present
oliver-sanders
added a commit
to oliver-sanders/jupyter_server
that referenced
this issue
Jun 11, 2021
* closes jupyter-server#241 * call a stop_extension method on server shutdown if present
oliver-sanders
added a commit
to oliver-sanders/jupyter_server
that referenced
this issue
Jun 30, 2021
* closes jupyter-server#241 * call a stop_extension method on server shutdown if present
Zsailer
pushed a commit
that referenced
this issue
Jul 8, 2021
* stop hook for extensions * closes #241 * call a stop_extension method on server shutdown if present * fix typo * make extension stop hooks async * extension stop hook tests * extension stop hooks feedback * run_sync * extension stop hooks extension_apps property
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there currently a way for a server extension (that would run alongside other server extensions) to provide a stop / unload / cleanup hook, that would be called when the main server app is terminated (potentially in the stop method)?
It looks like one way to achieve this would be for an
ExtensionApp
to define theExtensionApp.stop()
method. Although this might be dedicated to extension apps started as standalone extensions?As an example use case, a server extension could allocate extra resources that would need to be cleaned up when the app is stopped.
For example an
ExtensionApp
might want to instantiate a separateMappingKernelManager
to keep a set of kernels isolated from the default kernel manager (this is currently explored in voila-dashboards/voila#41 and also discussed in #235).Having a separate kernel manager would require calling the
shutdown_all
method to make sure the kernel processes are terminated.The text was updated successfully, but these errors were encountered: