mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-14 09:12:06 -05:00
add debug tag adr
This commit is contained in:
@@ -118,7 +118,7 @@ def list_s3_objects():
|
||||
break
|
||||
except Exception:
|
||||
current_app.logger.exception(
|
||||
"An error occurred while regenerating cache #notify-admin-1200",
|
||||
"An error occurred while regenerating cache #notify-debug-admin-1200",
|
||||
)
|
||||
|
||||
|
||||
@@ -200,7 +200,7 @@ def read_s3_file(bucket_name, object_key, s3res):
|
||||
|
||||
except LookupError:
|
||||
# perhaps our key is not formatted as we expected. If so skip it.
|
||||
current_app.logger.exception("LookupError #notify-admin-1200")
|
||||
current_app.logger.exception("LookupError #notify-debug-admin-1200")
|
||||
|
||||
|
||||
def get_s3_files():
|
||||
@@ -213,7 +213,7 @@ def get_s3_files():
|
||||
|
||||
s3res = get_s3_resource()
|
||||
current_app.logger.info(
|
||||
f"job_cache length before regen: {len_job_cache()} #notify-admin-1200"
|
||||
f"job_cache length before regen: {len_job_cache()} #notify-debug-admin-1200"
|
||||
)
|
||||
try:
|
||||
with ThreadPoolExecutor() as executor:
|
||||
@@ -222,7 +222,7 @@ def get_s3_files():
|
||||
current_app.logger.exception("Connection pool issue")
|
||||
|
||||
current_app.logger.info(
|
||||
f"job_cache length after regen: {len_job_cache()} #notify-admin-1200"
|
||||
f"job_cache length after regen: {len_job_cache()} #notify-debug-admin-1200"
|
||||
)
|
||||
|
||||
|
||||
@@ -290,7 +290,7 @@ def file_exists(file_location):
|
||||
|
||||
def get_job_location(service_id, job_id):
|
||||
current_app.logger.debug(
|
||||
f"#s3-partitioning NEW JOB_LOCATION: {NEW_FILE_LOCATION_STRUCTURE.format(service_id, job_id)}"
|
||||
f"#notify-debug-s3-partitioning NEW JOB_LOCATION: {NEW_FILE_LOCATION_STRUCTURE.format(service_id, job_id)}"
|
||||
)
|
||||
return (
|
||||
current_app.config["CSV_UPLOAD_BUCKET"]["bucket"],
|
||||
@@ -308,7 +308,7 @@ def get_old_job_location(service_id, job_id):
|
||||
Remove this when everything works with the NEW_FILE_LOCATION_STRUCTURE.
|
||||
"""
|
||||
current_app.logger.debug(
|
||||
f"#s3-partitioning OLD JOB LOCATION: {FILE_LOCATION_STRUCTURE.format(service_id, job_id)}"
|
||||
f"#notify-debug-s3-partitioning OLD JOB LOCATION: {FILE_LOCATION_STRUCTURE.format(service_id, job_id)}"
|
||||
)
|
||||
return (
|
||||
current_app.config["CSV_UPLOAD_BUCKET"]["bucket"],
|
||||
@@ -507,7 +507,7 @@ def get_personalisation_from_s3(service_id, job_id, job_row_number):
|
||||
|
||||
def get_job_metadata_from_s3(service_id, job_id):
|
||||
current_app.logger.debug(
|
||||
f"#s3-partitioning CALLING GET_JOB_METADATA with {service_id}, {job_id}"
|
||||
f"#notify-debug-s3-partitioning CALLING GET_JOB_METADATA with {service_id}, {job_id}"
|
||||
)
|
||||
obj = get_s3_object(*get_job_location(service_id, job_id))
|
||||
return obj.get()["Metadata"]
|
||||
|
||||
Reference in New Issue
Block a user