Skip to content

Commit

Permalink
fix: on failure job sensor
Browse files Browse the repository at this point in the history
  • Loading branch information
JasperHG90 committed Feb 2, 2024
1 parent 43ed8b4 commit 5a4d8ab
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 5a4d8ab

Please sign in to comment.