Open-EO / openeo-python-client

Python client API for OpenEO
https://open-eo.github.io/openeo-python-client/
Apache License 2.0
156 stars 42 forks source link

allow inspection of job manager thread state #640

Open soxofaan opened 1 month ago

soxofaan commented 1 month ago

Users can only start a job manager thread, and stop it, but they also might want to inspect the state: is it still running? and do something with that.

e.g. @mbuchhorn was playing with something like this:

while not manager._stop_thread:
    if not manager._stop_thread:
        visualize_something()
    time.sleep(15)

it should be possible to do that without using private _stop_thread

soxofaan commented 1 month ago

quick solution could be to just return the thread object itself from start_job_thread, then user can do whatever they want