add tss tournament stuff (#1346)

This commit is contained in:
NotSoToothless
2026-06-20 21:12:53 -07:00
committed by GitHub
parent b665eb118f
commit 018a09150d
5 changed files with 1101 additions and 0 deletions
+7
View File
@@ -171,6 +171,13 @@ async def _handle_game(game: Dict[str, Any]) -> None:
log.info("Stored game %s in DB", sid)
except Exception as exc:
log.error("DB insert failed for %s: %s", sid, exc)
# If this game belongs to a tournament we haven't indexed (or one that's live
# and stale), scan its authoritative bracket in the background. Never blocks.
try:
from BOT.tss_tournaments import maybe_scan_tournament
await maybe_scan_tournament(game)
except Exception as exc:
log.error("tournament scan trigger failed for %s: %s", sid, exc)
# Autolog match/dispatch (no-ops in standalone mode where no bot is set).
try:
await autolog_process_game(game)