mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-24 16:23:44 -04:00
@@ -645,8 +645,6 @@ def _generate_notifications_report(service_id, report_id, limit_days):
|
|||||||
region=region,
|
region=region,
|
||||||
bucket_name=bucket_name,
|
bucket_name=bucket_name,
|
||||||
file_location=file_location,
|
file_location=file_location,
|
||||||
access_key=access_key,
|
|
||||||
secret_key=secret_key,
|
|
||||||
)
|
)
|
||||||
current_app.logger.info(f"generate-notifications-report uploaded {file_location}")
|
current_app.logger.info(f"generate-notifications-report uploaded {file_location}")
|
||||||
|
|
||||||
|
|||||||
@@ -66,9 +66,16 @@ def s3upload(
|
|||||||
metadata = put_args["Metadata"] = metadata
|
metadata = put_args["Metadata"] = metadata
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
current_app.logger.info(f"Going to try to upload this {key}")
|
||||||
key.put(**put_args)
|
key.put(**put_args)
|
||||||
|
except botocore.exceptions.NoCredentialsError as e:
|
||||||
|
current_app.logger.exception(
|
||||||
|
f"Unable to upload {key} to S3 bucket because of {e}"
|
||||||
|
)
|
||||||
except botocore.exceptions.ClientError as e:
|
except botocore.exceptions.ClientError as e:
|
||||||
current_app.logger.exception("Unable to upload file to S3 bucket")
|
current_app.logger.exception(
|
||||||
|
f"Unable to upload {key}to S3 bucket because of {e}"
|
||||||
|
)
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user