From 07ec22881ea26b690c797bbd028f5a5635755f5b Mon Sep 17 00:00:00 2001 From: ITQ Date: Mon, 3 Mar 2025 10:54:28 +0300 Subject: [PATCH] (scope): [body] [footer(s)] --- services/checker/main.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/services/checker/main.py b/services/checker/main.py index 4d13a05..a1d05fa 100644 --- a/services/checker/main.py +++ b/services/checker/main.py @@ -1,4 +1,3 @@ -import docker.errors from fastapi import FastAPI, HTTPException, status from pydantic import BaseModel, Field, HttpUrl import aiohttp @@ -158,12 +157,12 @@ def run_container_safely( "stderr": f"Container error: {str(e)}", "status": -1, } - # finally: - # if container: - # try: - # container.remove(force=True) - # except docker.errors.DockerException: - # pass + finally: + if container: + try: + container.remove(force=True) + except docker.errors.DockerException: + pass def validate_file_path(path: str) -> bool: