mathworks / matlab-proxy

Python® package enables you to open a MATLAB® desktop in a web browser tab.
Other
43 stars 23 forks source link

Close MATLABProxyApp automatically after Matlab has been stopped via browser #36

Open swdn133 opened 1 week ago

swdn133 commented 1 week ago

Details of the feature

Usecase is the following: I have a docker container running matlab and matlab-proxy as described. I access matlab via browser and everything works fine. After I am finished working, I select the "Stop Matlab" option in the browser and matlab stops.

My issue: the MATLABProxyApp process is still running. So my container is kept alive and continues blocking resources.

It would be great to have some kind of Timeout that autmatically stops the proxy app when no matlab is running.

I know that the env variable MWI_SHUTDOWN_ON_IDLE_TIMEOUT exists. But this is not the behaviour i would like to see. When setting this variable, the container will also be shutdown when matlab is still active but idle. I think it would be great to have the option to let matlab be alive when idle but shutdown the proxy-app when no matlab is running at all.

prabhakk-mw commented 1 week ago

Thank you @swdn133 !

Would a button along side the "Stop MATLAB" option that terminates both MATLAB and the MATLAB-PROXY-APP processes serve your needs?

swdn133 commented 1 week ago

Hi @prabhakk-mw

Yes, that would be a perfect solution for my use case :)

prabhakk-mw commented 1 week ago

We are on it!

swdn133 commented 1 week ago

Awesome, thanks a lot!