add tss tournament stuff (#1346)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user