From 6dfeac93cd316617a2a58de8e17ff34336eb6d67 Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Wed, 16 Oct 2024 13:22:36 -0700 Subject: [PATCH] fix partitioning --- app/aws/s3.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/aws/s3.py b/app/aws/s3.py index a3cd35811..d4d704632 100644 --- a/app/aws/s3.py +++ b/app/aws/s3.py @@ -295,7 +295,11 @@ def get_old_job_location(service_id, job_id): def get_job_and_metadata_from_s3(service_id, job_id): - obj = get_s3_object(*get_job_location(service_id, job_id)) + try: + obj = get_s3_object(*get_job_location(service_id, job_id)) + except botocore.exceptions.ClientError: + obj = get_s3_object(*get_old_job_location(service_id, job_id)) + return obj.get()["Body"].read().decode("utf-8"), obj.get()["Metadata"]