Skip to content

Commit

Permalink
Clean up code
Browse files Browse the repository at this point in the history
  • Loading branch information
AC-Dap committed Nov 16, 2023
1 parent d910327 commit 339b67c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ersilia/core/tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 339b67c

Please sign in to comment.