Skip to content

Commit

Permalink
Add print to console and refactor comment about hardcoded rti-cromwel…
Browse files Browse the repository at this point in the history
…l-output
  • Loading branch information
jaamarks committed Jul 15, 2024
1 parent 4253094 commit 692255d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion archive_and_delete_from_s3/v1.1.0/glacierize.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,9 @@ def main(
False, "--dry-run", help="Perform a trial run with no changes made."
),
):

# hard coding rti-cromwell-output for safety
# if a person knows what they are doing then they can edit the code themselves
# **Modify with caution**
bucket_name = "rti-cromwell-output"

# Create an S3 client
Expand All @@ -153,6 +154,9 @@ def main(
now = datetime.datetime.now()
log_file_name = f"rti_cromwell_output_cleanup_{now:%Y_%m_%d_%Hh_%Mm_%Ss}.txt"

message = f"Archiving & deleting files from {bucket_name}"
print(message)

# open the log file and redirect standard output to it
with open(log_file_name, "w") as log_file:
sys.stdout = log_file
Expand Down

0 comments on commit 692255d

Please sign in to comment.