CoolFace
Apppublic

Backup-bdg/OpenHands

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
0likes
tenacity_stop.py12 linesDownload Raw Back to utils
1from tenacity import RetryCallState2from tenacity.stop import stop_base3 4from openhands.utils.shutdown_listener import should_exit5 6 7class stop_if_should_exit(stop_base):8    """Stop if the should_exit flag is set."""9 10    def __call__(self, retry_state: 'RetryCallState') -> bool:11        return bool(should_exit())12