Added check to shutdown hook (#6402)

This commit is contained in:
tofarr 2025-01-21 15:32:46 -07:00 committed by GitHub
parent b468150f2a
commit 318c811817
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -66,7 +66,7 @@ class DockerRuntime(ActionExecutionClient):
headless_mode: bool = True,
):
global _atexit_registered
if not _atexit_registered:
if not _atexit_registered and not config.sandbox.keep_runtime_alive:
_atexit_registered = True
atexit.register(remove_all_runtime_containers)