Auto merge dev → main (#1332)
* feat(tssbot): build_match_logs + match_logs persistence * feat(tssbot): create match_logs table and write logs at ingest * feat(tssbot): one-time match_logs backfill script * feat(srebot): persist chat/battle logs to match_logs (parity, no backfill) * feat(tssbot): Battle/Chat Log buttons on Discord scoreboards
This commit is contained in:
@@ -164,6 +164,10 @@ async def _handle_game(game: Dict[str, Any]) -> None:
|
||||
await insert_match(game)
|
||||
await insert_player_games(game)
|
||||
await upsert_tss_teams(game)
|
||||
from BOT.match_logs import build_match_logs, upsert_match_logs
|
||||
from BOT.storage import TSS_BATTLES_DB_PATH
|
||||
chat_log, battle_log = build_match_logs(game)
|
||||
await upsert_match_logs(TSS_BATTLES_DB_PATH, sid, chat_log, battle_log)
|
||||
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