Can't find setter for on_server_unloaded()

I am trying to create a Bokeh application as a subprocess and I am trying to have logs for when a session and server are shutdown.

I found within the Document class that there is a setter for on_session_destroyed which is session_destroyed_callback(). But I can’t find one corresponding to the server.

on_server_unloaded is not part of the Document API. You would need to use the general app_hooks.py mechanism as described in the documentation, in order to define that hook:[1]

https://docs.bokeh.org/en/latest/docs/user_guide/server/app.html#lifecycle-hooks


  1. If you are using the Bokeh server programmatically, it’s also possible to subclass and add a custom lifecycle handler to the application, but I will assume that uncommon case is not the case here. ↩︎

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.