Skip to content

Commit 9747bb3

Browse files
committed
removed batch_start_time
1 parent 5105331 commit 9747bb3

File tree

4 files changed

+0
-12
lines changed

4 files changed

+0
-12
lines changed

ack_backend/src/logging_decorators.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ def wrapper(message, created_at_formatted_string):
5858
additional_log_data = {
5959
"file_key": file_key,
6060
"message_id": message_id,
61-
"batch_start_time": message.get("batch_start_time", "unknown"),
6261
"operation_start_time": message.get("operation_start_time", "unknown"),
6362
"operation_end_time": message.get("operation_end_time", "unknown"),
6463
"vaccine_type": message.get("vaccine_type", "unknown"),

ack_backend/tests/utils/values_for_ack_backend_tests.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ class DefaultValues:
1616
imms_id = "test_imms_id"
1717
operation_requested = "CREATE"
1818
created_at_formatted_string = "20211120T12000000"
19-
batch_start_time = fixed_datetime_str
2019
operation_start_time = fixed_datetime_str
2120
operation_end_time = fixed_datetime_str
2221

@@ -96,7 +95,6 @@ def __init__(
9695
local_id: str = DefaultValues.local_id,
9796
imms_id: str = DefaultValues.imms_id,
9897
created_at_formatted_string: str = DefaultValues.created_at_formatted_string,
99-
batch_start_time: str = DefaultValues.batch_start_time,
10098
operation_start_time: str = DefaultValues.operation_start_time,
10199
operation_end_time: str = DefaultValues.operation_end_time,
102100
):
@@ -117,7 +115,6 @@ def __init__(
117115
self.local_id = local_id
118116
self.imms_id = imms_id
119117
self.created_at_formatted_string = created_at_formatted_string
120-
self.batch_start_time= batch_start_time
121118
self.operation_start_time = operation_start_time
122119
self.operation_end_time = operation_end_time
123120

@@ -128,7 +125,6 @@ def __init__(
128125
"supplier": self.supplier,
129126
"vaccine_type": self.vaccine_type,
130127
"created_at_formatted_string": self.created_at_formatted_string,
131-
"batch_start_time": self.batch_start_time,
132128
"operation_start_time": self.operation_start_time,
133129
"operation_end_time": self.operation_end_time,
134130
"row_id": self.row_id,
@@ -166,7 +162,6 @@ class ValidValues:
166162
mock_message_expected_log_value = {
167163
"function_name": "ack_processor_convert_message_to_ack_row",
168164
"date_time": fixed_datetime.strftime("%Y-%m-%d %H:%M:%S"),
169-
"batch_start_time": MOCK_MESSAGE_DETAILS.batch_start_time,
170165
"operation_start_time": MOCK_MESSAGE_DETAILS.operation_start_time,
171166
"operation_end_time": MOCK_MESSAGE_DETAILS.operation_end_time,
172167
"status": "success",
@@ -260,7 +255,6 @@ class InvalidValues:
260255
Logging_with_no_values = {
261256
"function_name": "ack_processor_convert_message_to_ack_row",
262257
"date_time": fixed_datetime.strftime("%Y-%m-%d %H:%M:%S"),
263-
"batch_start_time": "unknown",
264258
"operation_start_time": "unknown",
265259
"operation_end_time": "unknown",
266260
"status": "fail",

backend/src/forwarding_batch_lambda.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ def forward_request_to_dynamo(
6161
def forward_lambda_handler(event, _):
6262
"""Forward each row to the Imms API"""
6363
logger.info("Processing started")
64-
batch_start_time = str(datetime.now())
6564
table = create_table()
6665
filename_to_events_mapper = BatchFilenameToEventsMapper()
6766
array_of_identifiers = []
@@ -108,7 +107,6 @@ def forward_lambda_handler(event, _):
108107
imms_id = forward_request_to_dynamo(incoming_message_body, table, identifier_already_present, controller)
109108
filename_to_events_mapper.add_event(
110109
{ **base_outgoing_message_body,
111-
"batch_start_time": batch_start_time,
112110
"operation_start_time": operation_start_time,
113111
"operation_end_time": str(datetime.now()),
114112
"imms_id": imms_id }
@@ -117,7 +115,6 @@ def forward_lambda_handler(event, _):
117115
except Exception as error: # pylint: disable = broad-exception-caught
118116
filename_to_events_mapper.add_event(
119117
{ **base_outgoing_message_body,
120-
"batch_start_time": batch_start_time,
121118
"operation_start_time": operation_start_time,
122119
"operation_end_time": str(datetime.now()),
123120
"diagnostics": create_diagnostics_dictionary(error) }

backend/tests/test_forwarding_batch_lambda.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,6 @@ def test_forward_lambda_handler_groups_and_sends_events_by_filename(self, mock_s
455455
self.assertDictEqual(json.loads(first_call_kwargs["MessageBody"])[0], {
456456
"created_at_formatted_string": "2025-01-24T12:00:00Z",
457457
"file_key": "supplier_1_rsv_test_file",
458-
"batch_start_time": ANY,
459458
"operation_start_time": ANY,
460459
"operation_end_time": ANY,
461460
"imms_id": ANY,
@@ -468,7 +467,6 @@ def test_forward_lambda_handler_groups_and_sends_events_by_filename(self, mock_s
468467
self.assertDictEqual(json.loads(second_call_kwargs["MessageBody"])[0], {
469468
"created_at_formatted_string": "2025-01-24T12:00:00Z",
470469
"file_key": "supplier_2_rsv_test_file",
471-
"batch_start_time": ANY,
472470
"operation_start_time": ANY,
473471
"operation_end_time": ANY,
474472
"imms_id": ANY,

0 commit comments

Comments
 (0)