|
14 | 14 | from make_and_upload_ack_file import make_and_upload_the_ack_file |
15 | 15 | from audit_table import upsert_audit_table, get_next_queued_file_details, ensure_file_is_not_a_duplicate |
16 | 16 | from clients import logger |
17 | | -from elasticache import upload_to_elasticache |
18 | 17 | from logging_decorator import logging_decorator |
19 | 18 | from supplier_permissions import validate_vaccine_type_permissions |
20 | 19 | from errors import ( |
|
34 | 33 | @logging_decorator |
35 | 34 | def handle_record(record) -> dict: |
36 | 35 | """ |
37 | | - Processes a single record based on whether it came from the 'data-sources' or 'config' bucket. |
| 36 | + Processes a single record based on whether it came from the 'data-sources' bucket. |
38 | 37 | Returns a dictionary containing information to be included in the logs. |
39 | 38 | """ |
40 | 39 | try: |
@@ -140,17 +139,6 @@ def handle_record(record) -> dict: |
140 | 139 | "supplier": supplier |
141 | 140 | } |
142 | 141 |
|
143 | | - elif "config" in bucket_name: |
144 | | - try: |
145 | | - upload_to_elasticache(file_key, bucket_name) |
146 | | - logger.info("%s content successfully uploaded to cache", file_key) |
147 | | - message = "File content successfully uploaded to cache" |
148 | | - return {"statusCode": 200, "message": message, "file_key": file_key} |
149 | | - except Exception as error: # pylint: disable=broad-except |
150 | | - logger.error("Error uploading to cache for file '%s': %s", file_key, error) |
151 | | - message = "Failed to upload file content to cache" |
152 | | - return {"statusCode": 500, "message": message, "file_key": file_key, "error": str(error)} |
153 | | - |
154 | 142 | else: |
155 | 143 | try: |
156 | 144 | vaccine_type, supplier = validate_file_key(file_key) |
|
0 commit comments