From 5a4d8abfe7805d149c7fe20cf5a4d6e562d7ae58 Mon Sep 17 00:00:00 2001 From: Jasper Ginn Date: Fri, 2 Feb 2024 12:52:17 +0100 Subject: [PATCH] fix: on failure job sensor --- .../src/luchtmeetnet_ingestion/sensors.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/dags/luchtmeetnet_ingestion/src/luchtmeetnet_ingestion/sensors.py b/dags/luchtmeetnet_ingestion/src/luchtmeetnet_ingestion/sensors.py index 6f6f6a5..10362ee 100644 --- a/dags/luchtmeetnet_ingestion/src/luchtmeetnet_ingestion/sensors.py +++ b/dags/luchtmeetnet_ingestion/src/luchtmeetnet_ingestion/sensors.py @@ -42,12 +42,7 @@ def slack_message_on_success(context: RunStatusSensorContext, slack: SlackResour default_status=DefaultSensorStatus.RUNNING, ) def slack_message_on_failure(context: RunFailureSensorContext, slack: SlackResource): - message = ( - ( - f'Job "{context.dagster_run.job_name}" with ID "{context.dagster_run.run_id}" failed. Error Message:' - f" {context.failure_event.message}" - ), - ) + message = f'Job "{context.dagster_run.job_name}" with ID "{context.dagster_run.run_id}" failed. Error Message: {context.failure_event.message}"' if environment == "dev": context.log.info(message) else: