lets get this party starteddddd (#1287)
This commit is contained in:
@@ -30,6 +30,7 @@ from dotenv import load_dotenv
|
||||
from websockets.asyncio.client import connect as wsconnect
|
||||
|
||||
from BOT.storage import insert_match, insert_player_games
|
||||
from BOT.autologging import process_game as autolog_process_game
|
||||
|
||||
_HERE = Path(__file__).resolve().parent
|
||||
load_dotenv(dotenv_path=_HERE / ".env")
|
||||
@@ -172,6 +173,11 @@ 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)
|
||||
# Autolog match/dispatch (no-ops in standalone mode where no bot is set).
|
||||
try:
|
||||
await autolog_process_game(game)
|
||||
except Exception as exc:
|
||||
log.error("autolog failed for %s: %s", sid, exc)
|
||||
print(json.dumps(game, indent=2, ensure_ascii=False))
|
||||
print("-" * 80)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user