From 339b67c570cfba7ef8d60974d48429280f6630b6 Mon Sep 17 00:00:00 2001 From: Anthony Cui Date: Wed, 15 Nov 2023 23:34:30 -0500 Subject: [PATCH] Clean up code --- ersilia/core/tracking.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ersilia/core/tracking.py b/ersilia/core/tracking.py index 6df065bd8..0e4600748 100644 --- a/ersilia/core/tracking.py +++ b/ersilia/core/tracking.py @@ -53,14 +53,14 @@ def write_persistent_file(contents): def close_persistent_file(): # Make sure the file actually exists before we try renaming if os.path.isfile(PERSISTENT_FILE_PATH): + log_files_metrics(TEMP_FILE_LOGS) + new_file_path = os.path.join( os.path.dirname(PERSISTENT_FILE_PATH), datetime.now().strftime("%Y-%m-%d%_H-%M-%S.txt"), ) os.rename(PERSISTENT_FILE_PATH, new_file_path) - log_files_metrics(TEMP_FILE_LOGS) - def upload_to_s3(json_dict, bucket="t4sg-ersilia", object_name=None): """Upload a file to an S3 bucket