eshaan7 / Flask-Shell2HTTP

Execute shell commands via HTTP server (via flask's endpoints).
https://flask-shell2http.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
170 stars 28 forks source link

Possibility to interrupt command #38

Open njxqlus opened 2 years ago

njxqlus commented 2 years ago

Is it possible to interrupt command (like CTRL+C)?

For example, I started Locust (load testing framework) for one file, now I want to stop it and start one more test with other params.

eshaan7 commented 2 years ago

Hello.

At the moment, there's no way to request cancellation of a running command but I can see how it could be an useful addition to this package.

Meanwhile, you may be able to achieve what you want by providing a lower timeout value and making force_unique_key=true. Refer here.

njxqlus commented 2 years ago

@eshaan7 OMG, so fast! Thank you, waiting for new release

eshaan7 commented 2 years ago

You're welcome, @njxqlus! This feature is available in the v1.9.0 release which is already live on pypi.

njxqlus commented 2 years ago

Delete endpoint still don't terminate or kill process. That's mean, for example, if I call sleep for 10 minutes, process sleep will exists for 10 minutes