Graceful WebSocket disconnect and HF warning suppression in run.bat

This commit is contained in:
Mazonia
2026-09-21 23:01:16 +00:00
parent ea4d66db69
commit fc581a1eae
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -568,7 +568,7 @@ async def websocket_endpoint(websocket: WebSocket):
if data == "ping":
await websocket.send_text(json.dumps({"type": "pong"}))
except WebSocketDisconnect:
except (WebSocketDisconnect, Exception):
connected_clients.discard(websocket)
logger.info(f"WebSocket client disconnected ({len(connected_clients)} total)")
+1
View File
@@ -2,6 +2,7 @@
chcp 65001 >nul
set PYTHONUTF8=1
set PYTHONIOENCODING=utf-8
set HF_HUB_DISABLE_SYMLINKS_WARNING=1
set VENV_PY=C:\Users\Mazonia\.gemini\antigravity-ide\scratch\XAUUSD-AI-Trading-Bot\venv\Scripts\python.exe
if exist "%VENV_PY%" (
"%VENV_PY%" main.py %*