tss db wipe and update (#1305)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user