From 3743630547300f652fa493b8b1abf602ce5e3f4d Mon Sep 17 00:00:00 2001 From: NoeBerdoz Date: Sat, 12 Apr 2025 17:48:53 +0200 Subject: [PATCH] always store all documents --- utils/storage/game_files_manager.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/utils/storage/game_files_manager.py b/utils/storage/game_files_manager.py index 44778db..14f577d 100644 --- a/utils/storage/game_files_manager.py +++ b/utils/storage/game_files_manager.py @@ -112,6 +112,7 @@ def store_game_round_data(decision: str, response: GameStartResponseDTO | GameDe previous_folder_path_instance.rename(new_gameover_path) logging.info(f"[+] Renamed gameover folder: {new_gameover_path}") else: + padded_round = str(round_number).zfill(FOLDER_ROUND_PADDING) round_folder_name = f"{padded_round}_decision_{decision.lower()}_{status}" @@ -123,8 +124,11 @@ def store_game_round_data(decision: str, response: GameStartResponseDTO | GameDe with open(json_file_path, "w") as json_file: json.dump(response.model_dump_json(), json_file) + logging.info(f"[+] Successfully saved API response JSON to: {json_file_path}") + + store_decoded_files(response.model_dump_json(), round_dir) + - logging.info(f"[+] Successfully saved API response JSON to: {json_file_path}") except Exception as e: logging.error(f"[!] Failed to save API response JSON: {e}")