some log output

This commit is contained in:
Maximilian Keßler 2023-11-24 15:09:21 +01:00
parent 613bb108a7
commit a6c96c7b04
Signed by: max
GPG Key ID: BCC5A619923C0BA5

View File

@ -73,6 +73,7 @@ def analyze_replay(instance: hanab_game.HanabiInstance, actions: List[hanab_game
def analyze_game_and_store_stats(game_id: int): def analyze_game_and_store_stats(game_id: int):
logger.verbose("Analysing game {} for BDRs and lost crits".format(game_id))
instance, actions = games_db_interface.load_game(game_id) instance, actions = games_db_interface.load_game(game_id)
analysis = analyze_replay(instance, actions) analysis = analyze_replay(instance, actions)
@ -88,6 +89,11 @@ def analyze_game_and_store_stats(game_id: int):
def analyze_all_games(): def analyze_all_games():
"""
Runs analysis on replays of all games
@warning: This assumes that detailed game data has been fetched from the server already
"""
logger.info("Analysing replays of all games.")
cur = conn_manager.get_new_cursor() cur = conn_manager.get_new_cursor()
cur.execute( cur.execute(
"SELECT id FROM games " "SELECT id FROM games "