Spaces:
Configuration error
Configuration error
Download openhands/runtime/utils/tenacity_stop.py from flyingdarkdev/README: direct link, hf CLI and curl.
- Browser
- Download file 311 Bytes
-
https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/openhands/runtime/utils/tenacity_stop.py
- Command line
-
hf download hf://spaces/flyingdarkdev/README/openhands/runtime/utils/tenacity_stop.py
-
curl -L -o tenacity_stop.py https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/openhands/runtime/utils/tenacity_stop.py
311 Bytes
| from tenacity import RetryCallState | |
| from tenacity.stop import stop_base | |
| from openhands.utils.shutdown_listener import should_exit | |
| class stop_if_should_exit(stop_base): | |
| """Stop if the should_exit flag is set.""" | |
| def __call__(self, retry_state: 'RetryCallState') -> bool: | |
| return should_exit() | |