mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-07 19:28:25 -04:00
Merge pull request #1970 from GSA/notify-api-1299
optimize S3 partitioning
This commit is contained in:
@@ -1034,7 +1034,7 @@ def _send_notification(service_id, template_id):
|
|||||||
# on the API side to find out what happens to the message.
|
# on the API side to find out what happens to the message.
|
||||||
current_app.logger.info(
|
current_app.logger.info(
|
||||||
hilite(
|
hilite(
|
||||||
f"One-off file: {filename} job_id: {upload_id} s3 location: service-{service_id}-notify/{upload_id}.csv"
|
f"One-off file: {filename} job_id: {upload_id} s3 location: {service_id}-service-notify/{upload_id}.csv"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -10,13 +10,13 @@ from app.s3_client import (
|
|||||||
)
|
)
|
||||||
from notifications_utils.s3 import s3upload as utils_s3upload
|
from notifications_utils.s3 import s3upload as utils_s3upload
|
||||||
|
|
||||||
FILE_LOCATION_STRUCTURE = "service-{}-notify/{}.csv"
|
NEW_FILE_LOCATION_STRUCTURE = "{}-service-notify/{}.csv"
|
||||||
|
|
||||||
|
|
||||||
def get_csv_location(service_id, upload_id):
|
def get_csv_location(service_id, upload_id):
|
||||||
return (
|
return (
|
||||||
current_app.config["CSV_UPLOAD_BUCKET"]["bucket"],
|
current_app.config["CSV_UPLOAD_BUCKET"]["bucket"],
|
||||||
FILE_LOCATION_STRUCTURE.format(service_id, upload_id),
|
NEW_FILE_LOCATION_STRUCTURE.format(service_id, upload_id),
|
||||||
current_app.config["CSV_UPLOAD_BUCKET"]["access_key_id"],
|
current_app.config["CSV_UPLOAD_BUCKET"]["access_key_id"],
|
||||||
current_app.config["CSV_UPLOAD_BUCKET"]["secret_access_key"],
|
current_app.config["CSV_UPLOAD_BUCKET"]["secret_access_key"],
|
||||||
current_app.config["CSV_UPLOAD_BUCKET"]["region"],
|
current_app.config["CSV_UPLOAD_BUCKET"]["region"],
|
||||||
|
|||||||
Reference in New Issue
Block a user