diff --git a/backend/app.py b/backend/app.py index a751001..18df0ff 100644 --- a/backend/app.py +++ b/backend/app.py @@ -54,7 +54,6 @@ logger.info("Backend starting — log file: %s", LOG_DIR / "vm-bench-backend.log # --------------------------------------------------------------------------- # Constants # --------------------------------------------------------------------------- -STAGING_IN = "/mnt/converter/in" API_PREFIX = "/api/v1" # --------------------------------------------------------------------------- diff --git a/backend/converter.py b/backend/converter.py index 070ba1d..48e9e5f 100644 --- a/backend/converter.py +++ b/backend/converter.py @@ -17,7 +17,6 @@ from typing import Optional STAGING_ROOT = Path("/mnt/converter/tmp") STAGING_IN = STAGING_ROOT / "in" -STAGING_OUT = STAGING_ROOT / "out" logger = logging.getLogger("backend.converter") @@ -108,7 +107,7 @@ def extract_if_needed(filename: str) -> Path: raise RuntimeError(f"{tool} failed: {result.stderr.strip()[:500]}") # Determine what was created - after = set(STAGING_IN.iterdir()) + after = set(extract_base.iterdir()) new_items = after - before # If the archive had a single top-level directory matching the stem, use it diff --git a/backend/install.sh b/backend/install.sh index c2f4d63..18a0492 100755 --- a/backend/install.sh +++ b/backend/install.sh @@ -58,8 +58,6 @@ echo "[1/6] Creating directory structure..." for d in \ "$CONVERTER_ROOT" \ - "$CONVERTER_ROOT/in" \ - "$CONVERTER_ROOT/out" \ "$CONVERTER_ROOT/logs" \ "$CONVERTER_ROOT/tmp" \ "$CONVERTER_ROOT/backend" \ diff --git a/frontend/vm-bench.service b/frontend/vm-bench.service index f03ccfa..37facb6 100644 --- a/frontend/vm-bench.service +++ b/frontend/vm-bench.service @@ -8,7 +8,7 @@ User=root WorkingDirectory=/mnt/converter/frontend Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin Environment=BACKEND_URL=http://10.2.0.2:9000 -Environment=TMPDIR=/mnt/converter/in +Environment=TMPDIR=/mnt/converter/tmp ExecStart=/usr/bin/python3 -m uvicorn app:app --host 0.0.0.0 --port 5000 --timeout-keep-alive 300 Restart=always RestartSec=3