Timeout grab camera 60 s e sorgenti admin 15 s (prima apertura GenTL lenta). Refs #106

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-25 17:54:56 +01:00
parent 08616aa1fa
commit 7cb877b11b
5 changed files with 11 additions and 5 deletions
+4 -1
View File
@@ -17,6 +17,9 @@ from services.file_proxy import proxy_file
maker_bp = Blueprint("maker", __name__, url_prefix="/maker")
# #106: la prima apertura GenTL dopo l'avvio supera 15 s, il grab ha bisogno di piu margine
CAMERA_GRAB_TIMEOUT_S = 60
# ============================================================================
# PAGINE (GET)
@@ -608,7 +611,7 @@ def api_station_camera_grab(station_id: int):
resp = http_requests.post(
f"{camera_url.rstrip('/')}/camera/grab",
json={"source": camera_source, "trigger": "continuo", "timeout_ms": 5000},
timeout=15,
timeout=CAMERA_GRAB_TIMEOUT_S, # #106: era 15, troppo corto alla prima apertura GenTL
)
except http_requests.RequestException as exc:
return jsonify({