mirror of
https://github.com/usestrix/strix.git
synced 2026-08-20 18:38:57 +02:00
feat: remove docker container on shutdown
Add automatic cleanup of Docker containers when the application exits. Uses a singleton runtime pattern and spawns a detached subprocess for cleanup to ensure fast exit without blocking the UI.
This commit is contained in:
@@ -106,7 +106,10 @@ async def run_cli(args: Any) -> None: # noqa: PLR0915
|
||||
tracer.vulnerability_found_callback = display_vulnerability
|
||||
|
||||
def cleanup_on_exit() -> None:
|
||||
from strix.runtime import cleanup_runtime
|
||||
|
||||
tracer.cleanup()
|
||||
cleanup_runtime()
|
||||
|
||||
def signal_handler(_signum: int, _frame: Any) -> None:
|
||||
tracer.cleanup()
|
||||
|
||||
Reference in New Issue
Block a user