Skip to content

Commit e9140f1

Browse files
committed
tidy
1 parent c0c1628 commit e9140f1

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

ack_backend/src/ack_processor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ def lambda_handler(event, context):
1313
For each record: each message in the array of messages is converted to an ack row,
1414
then all of the ack rows for that array of messages are uploaded to the ack file in one go.
1515
"""
16+
1617
if not event.get("Records"):
1718
raise ValueError("Error in ack_processor_lambda_handler: No records found in the event")
1819

@@ -23,6 +24,7 @@ def lambda_handler(event, context):
2324
ack_data_rows = []
2425

2526
for i, record in enumerate(event["Records"]):
27+
2628
try:
2729
incoming_message_body = json.loads(record["body"])
2830
except Exception as body_json_error:

ack_backend/src/convert_message_to_ack_row.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from logging_decorators import convert_message_to_ack_row_logging_decorator
55
from update_ack_file import create_ack_data
66

7+
78
def get_error_message_for_ack_file(message_diagnostics) -> Union[None, str]:
89
"""Determines and returns the error message to be displayed in the ack file"""
910
if message_diagnostics is None:

batch_processor_filter/src/batch_processor_filter_service.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ def apply_filter(self, batch_file_created_event: BatchFileCreatedEvent) -> None:
3232
supplier = batch_file_created_event["supplier"]
3333
vaccine_type = batch_file_created_event["vaccine_type"]
3434

35-
logger.info("Received batch file event for filename: %s with message id: %s", filename, message_id)
36-
3735
if self._is_duplicate_file(filename):
3836
# Mark as processed and return without error so next event will be picked up from queue
3937
logger.error("A duplicate file has already been processed. Filename: %s", filename)
@@ -54,12 +52,12 @@ def apply_filter(self, batch_file_created_event: BatchFileCreatedEvent) -> None:
5452
raise EventAlreadyProcessingForSupplierAndVaccTypeError(f"Batch event already processing for supplier: "
5553
f"{supplier} and vacc type: {vaccine_type}")
5654

57-
self._batch_audit_repository.update_status(message_id, FileStatus.PROCESSING)
5855
self._queue_client.send_message(
5956
QueueUrl=QUEUE_URL,
6057
MessageBody=json.dumps(batch_file_created_event),
6158
MessageGroupId=f"{supplier}_{vaccine_type}"
6259
)
60+
self._batch_audit_repository.update_status(message_id, FileStatus.PROCESSING)
6361

6462
successful_log_message = f"File forwarded for processing by ECS. Filename: {filename}"
6563
logger.info(successful_log_message)

0 commit comments

Comments
 (0)