Auto merge dev → main (#1353)
* feat(gateway): hashed key store with grant + hot reload Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat(gateway): channel registry + aiohttp app (keyed auth, whoami, per-channel ws/proxy) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat(gateway): manage_keys CLI (add/list/revoke) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat(gateway): retire srebot_external, run relay-gateway under PM2 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat(gateway): point ecosystem + README at relay-gateway Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat(tss): replay outbox producer for relay gateway Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat(tss): forward processed games to relay outbox Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat(tss-api): db helpers, app skeleton, info endpoint, fixtures Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat(tss-api): player, games, history, search endpoints Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat(tss-api): live, match, scoreboard, matches-search, maps Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat(tss-api): filter-required leaderboards (players/vehicles/stats) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat(tss-api): tournament list/detail/standings/matches Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat: wire tss upstream through gateway + tssbot-api PM2 app Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -30,6 +30,7 @@ from websockets.asyncio.client import connect as wsconnect
|
||||
|
||||
from BOT.storage import insert_match, insert_player_games, upsert_tss_teams
|
||||
from BOT.autologging import process_game as autolog_process_game
|
||||
from BOT.receiver_bridge import publish_replay_batch
|
||||
from spectra_ws_payload import SpectraPayloadError, decode_spectra_ws_payload
|
||||
|
||||
_HERE = Path(__file__).resolve().parent
|
||||
@@ -171,6 +172,12 @@ 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)
|
||||
# Forward the processed game to the relay gateway (tss channel). Best-effort:
|
||||
# a bridge failure must never break ingest.
|
||||
try:
|
||||
await publish_replay_batch([game])
|
||||
except Exception as exc:
|
||||
log.warning("[TSS-BRIDGE] Failed to forward replay batch 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:
|
||||
|
||||
Reference in New Issue
Block a user