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
measure_bp = Blueprint("measure", __name__)
# #106: la prima apertura GenTL dopo l'avvio supera 15 s, il grab ha bisogno di piu margine
CAMERA_GRAB_TIMEOUT_S = 60
# Session key holding a station chosen at runtime, overriding Config.STATION_CODE.
STATION_OVERRIDE_KEY = "station_override"
@@ -1117,7 +1120,7 @@ def api_vision_grab():
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({