I’m embedding bokeh server in a flask web application, using the autoload_server method for different bokeh applications in that server.
I have different bokeh documents embedded in the same html page, and when an outer change occurs, i send different update functions to the add_next_tick_callback of the different documents.
I has multiple users, so in order to track which documents needs to be updated when an outer change occurs, i transfer a unique id as the session_id to the autoload_server method, and keep that id as a flask session variable.
The problem is that if a user closes the browser’s tab, the bokeh sessions isn’t deleted immediately, so if the user opens a new tab and enters the application again (without waiting a minute or so), autoload_server is called with a session id of an existing session, which causes problems.
I tried calling the request_expiration method on each session i create, but the session still isn’t deleted immediately by the bokeh server when the browser’s tab is closed. is there a way to terminate it immediately?
I'm embedding bokeh server in a flask web application, using the autoload_server method for different bokeh applications in that server.
I have different bokeh documents embedded in the same html page, and when an outer change occurs, i send different update functions to the add_next_tick_callback of the different documents.
I has multiple users, so in order to track which documents needs to be updated when an outer change occurs, i transfer a unique id as the session_id to the autoload_server method, and keep that id as a flask session variable.
The problem is that if a user closes the browser's tab, the bokeh sessions isn't deleted immediately, so if the user opens a new tab and enters the application again (without waiting a minute or so), autoload_server is called with a session id of an existing session, which causes problems.
I tried calling the request_expiration method on each session i create, but the session still isn't deleted immediately by the bokeh server when the browser's tab is closed. is there a way to terminate it immediately?