Skip to content

Commit a8a5164

Browse files
committed
remove prefix
1 parent 4c20376 commit a8a5164

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lambdas/filenameprocessor/src/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
VACCINE_TYPE_TO_DISEASES_HASH_KEY = "vacc_to_diseases"
2323
ODS_CODE_TO_SUPPLIER_SYSTEM_HASH_KEY = "ods_code_to_supplier"
24-
EXTENDED_ATTRIBUTES_FILE_PREFIXES = "Vaccination_Extended_Attributes"
24+
EXTENDED_ATTRIBUTES_FILE_PREFIX = "Vaccination_Extended_Attributes"
2525
DPS_DESTINATION_PREFIX = "dps_destination/"
2626

2727
ERROR_TYPE_TO_STATUS_CODE_MAP = {

lambdas/filenameprocessor/src/file_name_processor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
DPS_DESTINATION_BUCKET_NAME,
1919
DPS_DESTINATION_PREFIX,
2020
ERROR_TYPE_TO_STATUS_CODE_MAP,
21-
EXTENDED_ATTRIBUTES_FILE_PREFIXES,
21+
EXTENDED_ATTRIBUTES_FILE_PREFIX,
2222
SOURCE_BUCKET_NAME,
2323
FileNotProcessedReason,
2424
FileStatus,
@@ -77,7 +77,7 @@ def handle_record(record) -> dict:
7777
s3_response = get_s3_client().get_object(Bucket=bucket_name, Key=file_key)
7878
created_at_formatted_string, expiry_timestamp = get_creation_and_expiry_times(s3_response)
7979

80-
if file_key.startswith(EXTENDED_ATTRIBUTES_FILE_PREFIXES):
80+
if file_key.startswith(EXTENDED_ATTRIBUTES_FILE_PREFIX):
8181
return handle_extended_attributes_file(
8282
file_key,
8383
bucket_name,
@@ -107,7 +107,7 @@ def handle_unexpected_bucket_name(bucket_name: str, file_key: str) -> dict:
107107
"""Handles scenario where Lambda was not invoked by the data-sources bucket. Should not occur due to terraform
108108
config and overarching design"""
109109
try:
110-
if file_key.startswith(EXTENDED_ATTRIBUTES_FILE_PREFIXES):
110+
if file_key.startswith(EXTENDED_ATTRIBUTES_FILE_PREFIX):
111111
extended_attribute_identifier = validate_extended_attributes_file_key(file_key)
112112
logger.error(
113113
"Unable to process file %s due to unexpected bucket name %s",

0 commit comments

Comments
 (0)