v1.0.178: fix async classify polling — frontend ждёт done>=total через batch-progress, fix путь логов

This commit is contained in:
2026-06-25 14:41:41 +04:00
parent 4e9dd94433
commit f143894e10
2 changed files with 37 additions and 9 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# ⛔ НЕ МЕНЯТЬ БЕЗ РАЗРЕШЕНИЯ НАЕЛЯ ⛔
"""Contracts VM server — thin HTTP router. All logic in db/ and services/."""
from http.server import HTTPServer, BaseHTTPRequestHandler
from socketserver import ThreadingMixIn, TCPServer
@@ -267,7 +268,7 @@ class Handler(BaseHTTPRequestHandler):
# Запустить classify_worker.py в отдельном процессе
# Лог в /home/naeel/contracts/logs/ вместо DEVNULL
log_dir = "/home/naeel/contracts/logs"
log_dir = "/home/naeel/nubes/contracts/logs"
os.makedirs(log_dir, exist_ok=True)
log_path = os.path.join(log_dir, f"classify_{batch_id}.log")
log_file = open(log_path, "w")