Does anyone knows how to use Lifecycle Hooks with Bokeh as a library and with 2 or more application scripts like this?
And it is possible to define this 2 functions below inside Bokeh application script so that they can be able to use all the script’s variables and then be called by the Lifecycle Hook?
The application calls methods on app handler like "on_session_created" if they exist. Right now, of the built in handlers, only the DirectoryHandler has these methods defined, and the ones defined on it delegate to the functions in a "server_lifecycle.py" file. But what the primary thing is that the methods are defined on on the handler. So your best bet, e.g. if you are using FunctionHander or ScriptHandler, is to subclass those handler to add the lifecycle methods you need.
For reference, the ones on DirectoryHandler are defined here:
Does anyone knows how to use Lifecycle Hooks with Bokeh as a library and with 2 or more application scripts like this?
And it is possible to define this 2 functions below inside Bokeh application script so that they can be able to use all the script's variables and then be called by the Lifecycle Hook?