diff --git a/apps/check-processing-time/src/check_processing_time.py b/apps/check-processing-time/src/check_processing_time.py index def7268d7..bd94e5e42 100644 --- a/apps/check-processing-time/src/check_processing_time.py +++ b/apps/check-processing-time/src/check_processing_time.py @@ -14,9 +14,6 @@ def get_time_from_result(result: Union[list, dict]) -> Union[list, float]: def lambda_handler(event, _) -> Optional[list[Union[list, float]]]: - if event['processing_failed']: - return None - processing_results = event['processing_results'] result_list = [processing_results[key] for key in sorted(processing_results.keys())] return get_time_from_result(result_list) diff --git a/apps/step-function.json.j2 b/apps/step-function.json.j2 index 046da0169..02279c91a 100644 --- a/apps/step-function.json.j2 +++ b/apps/step-function.json.j2 @@ -4,7 +4,6 @@ "SET_DEFAULT_RESULTS": { "Type": "Pass", "Result": { - "processing_times": null, "get_files": { "logs": [], "expiration_time": null @@ -145,8 +144,7 @@ "Type": "Task", "Resource": "${CheckProcessingTimeLambdaArn}", "Parameters": { - "processing_results.$": "$.results.processing_results", - "processing_failed.$": "$.results.processing_failed" + "processing_results.$": "$.results.processing_results" }, "Retry": [ { @@ -209,7 +207,7 @@ "status_code": "FAILED", "logs.$": "$.results.get_files.logs", "expiration_time.$": "$.results.get_files.expiration_time", - "processing_times.$": "$.results.processing_times" + "processing_times": null }, "Retry": [ { diff --git a/tests/test_check_processing_time.py b/tests/test_check_processing_time.py index 7d02c93f4..a2a131985 100644 --- a/tests/test_check_processing_time.py +++ b/tests/test_check_processing_time.py @@ -5,7 +5,6 @@ def test_lambda_handler(): event = { - 'processing_failed': False, 'processing_results': { 'step_0': { 'StartedAt': 3000, @@ -32,7 +31,6 @@ def test_lambda_handler(): def test_lambda_handler_invalid_result(): event = { - 'processing_failed': False, 'processing_results': { 'step_0': { 'StartedAt': 1000, @@ -44,7 +42,6 @@ def test_lambda_handler_invalid_result(): check_processing_time.lambda_handler(event, None) event = { - 'processing_failed': False, 'processing_results': { 'step_0': { 'StartedAt': 2000, @@ -56,7 +53,6 @@ def test_lambda_handler_invalid_result(): check_processing_time.lambda_handler(event, None) event = { - 'processing_failed': False, 'processing_results': { 'step_0': { 'StartedAt': 3000, @@ -76,16 +72,3 @@ def test_lambda_handler_invalid_result(): } with pytest.raises(ValueError, match=r'^-0.2 <= 0.0$'): check_processing_time.lambda_handler(event, None) - - -def test_lambda_handler_failed_job(): - event = { - 'processing_failed': True, - 'processing_results': { - 'step_0': { - 'StartedAt': 3000, - 'StoppedAt': 8700, - }, - } - } - assert check_processing_time.lambda_handler(event, None) is None