Skip to content

Commit 7aa9545

Browse files
committed
Cleanup
1 parent f756f51 commit 7aa9545

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

filenameprocessor/src/file_name_processor.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ def handle_record(record) -> dict:
7070
created_at_formatted_string = get_created_at_formatted_string(bucket_name, file_key)
7171

7272
vaccine_type, supplier = validate_file_key(file_key)
73-
7473
permissions = validate_vaccine_type_permissions(vaccine_type=vaccine_type, supplier=supplier)
7574
if not is_existing_file:
7675
ensure_file_is_not_a_duplicate(file_key, created_at_formatted_string)

filenameprocessor/src/logging_decorator.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
from datetime import datetime
77
from functools import wraps
88
from clients import firehose_client, logger
9-
from file_key_validation import validate_file_key
10-
119

1210
STREAM_NAME = os.getenv("SPLUNK_FIREHOSE_NAME", "immunisation-fhir-api-internal-dev-splunk-firehose")
1311

@@ -53,11 +51,7 @@ def wrapper(*args, **kwargs):
5351
return result
5452

5553
except Exception as e:
56-
file_key = args[0]["s3"]["object"]["key"]
57-
vaccine_type, supplier = validate_file_key(file_key)
58-
59-
additional_log_data = {"statusCode": 500, "error": str(e), "vaccine_type": vaccine_type,
60-
"supplier": supplier}
54+
additional_log_data = {"statusCode": 500, "error": str(e)}
6155
generate_and_send_logs(start_time, base_log_data, additional_log_data, is_error_log=True)
6256
raise
6357

0 commit comments

Comments
 (0)