You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
it would be great, if you could exit the server instance (check in license) once one uses the python del operator and once the python process finishes.
💡 Steps for implementing the feature
No response
🔗 Useful links and references
No response
The text was updated successfully, but these errors were encountered:
Hi @waltersma,
You are right, this is doing the job, if everything works fine. Client.exit() does not work, if an error occurs during the script execution at an earlier stage. The server process stays alive and keeps the license. If that happens, one has to search for the process and kill it manually. As a workaround for this, I implemented the following for now:
It seems like each pyansys package uses a different interface for launch and exit (for example: launch, start, stop, restart, exit, with). It would be great to have identical interfaces to launch and close the server. Other pyansys packages also kill the server process once the script ends, an error occurs or the client instance has been deleted. To be more precise the server process is stopped, if it was launched during the session by the client.
There exists a generic pyansys interface that uses the python builtin weakreffinalize implementation, see: https://github.com/ansys/ansys-tools-local-product-launcher/blob/38840c7f8bd01ccc529d6b76d151c1f503d0cb4a/src/ansys/tools/local_product_launcher/product_instance.py#L52
I talked to @greschd, who gave me the above link and implemented the plugin for pyACP. He can help you and explain this much better than I can.
Hi @waltersma,
There is another advantage to use this finalize approach. If you are in debug mode using your IDE and you manually kill the python process, the server is killed and the license is checked in as well.
📝 Description of the feature
Hi,
it would be great, if you could exit the server instance (check in license) once one uses the python del operator and once the python process finishes.
💡 Steps for implementing the feature
No response
🔗 Useful links and references
No response
The text was updated successfully, but these errors were encountered: