trungleduc / jupyter_app_launcher

A JupyterLab extension to create custom launcher entries.
https://jupyter-app-launcher.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
53 stars 11 forks source link

Prevent multiple instances at the same time #60

Open pya opened 4 months ago

pya commented 4 months ago

Thanks for this great extension.

I am using local-server to start an application. This works well. My application should have only one instance. Therefore, I stop my application when the tab, created with a click on the launch button, is closed. This works nicely. But my application breaks if the user opens a second tab, which creates a second instance of my application while the old instance is still running. Is there a way to close a tab when a new one is created?

trungleduc commented 1 month ago

hi, for your use case, I would create a custom startup script in python or bash to check for the application instance before starting the web server.