Skip to content

Commit

Permalink
Make base folder as cluster name
Browse files Browse the repository at this point in the history
  • Loading branch information
shloka-bhalgat-unskript committed May 24, 2024
1 parent 3cac2d6 commit bf0b332
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions unskript-ctl/unskript_upload_results_to_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ def __init__(self):

def rename_and_upload(self, customer_name, checks_output):
today_date = datetime.now().strftime("%m_%d_%y")
file_name = f"{customer_name}_{today_date}.json"
folder_name = today_date
file_name = f"{customer_name}_{today_date}_failed_objects.json"
folder_name = customer_name
file_path = f"{folder_name}/{file_name}"

try:
Expand Down Expand Up @@ -71,5 +71,5 @@ def rename_and_upload(self, customer_name, checks_output):
except Exception as e:
logger.debug(f"Unable to upload failed objetcs file to S3 bucket: {e}")
# Remove the local file after upload
# logger.debug(f"Removing local file of check outputs json from /tmp: {local_file_name}")
logger.debug(f"Removing local file of check outputs json from /tmp: {local_file_name}")
os.remove(local_file_name)

0 comments on commit bf0b332

Please sign in to comment.