tss db wipe and update (#1305)

This commit is contained in:
NotSoToothless
2026-06-07 17:28:16 -07:00
committed by GitHub
parent 632a441080
commit abab7ea9fa
7 changed files with 223 additions and 396 deletions
+2 -1
View File
@@ -28,7 +28,7 @@ from typing import Any, Callable, Awaitable, List, Dict, Optional
from dotenv import load_dotenv
from websockets.asyncio.client import connect as wsconnect
from BOT.storage import insert_match, insert_player_games
from BOT.storage import insert_match, insert_player_games, upsert_tss_teams
from BOT.autologging import process_game as autolog_process_game
from spectra_ws_payload import SpectraPayloadError, decode_spectra_ws_payload
@@ -163,6 +163,7 @@ async def _handle_game(game: Dict[str, Any]) -> None:
try:
await insert_match(game)
await insert_player_games(game)
await upsert_tss_teams(game)
log.info("Stored game %s in DB", sid)
except Exception as exc:
log.error("DB insert failed for %s: %s", sid, exc)