Skip to content

Commit

Permalink
update context method in email sensor
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiedemaria committed Nov 6, 2023
1 parent 684a01c commit e604bfa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python_modules/dagster/dagster/_utils/alert.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def _default_failure_email_body(context: "RunFailureSensorContext") -> str:

return "<br>".join(
[
f"Pipeline {context.dagster_run.job_name} failed!",
f"Job {context.dagster_run.job_name} failed!",
f"Run ID: {context.dagster_run.run_id}",
f"Mode: {DEFAULT_MODE_NAME}",
f"Error: {context.failure_event.message}",
Expand All @@ -31,7 +31,7 @@ def _default_failure_email_body(context: "RunFailureSensorContext") -> str:


def _default_failure_email_subject(context) -> str:
return f"Dagster Run Failed: {context.pipeline_run.job_name}"
return f"Dagster Run Failed: {context.dagster_run.job_name}"


EMAIL_MESSAGE = """From: {email_from}
Expand Down Expand Up @@ -165,7 +165,7 @@ def my_repo():
def my_message_fn(context: RunFailureSensorContext) -> str:
return (
f"Job {context.pipeline_run.job_name} failed!"
f"Job {context.dagster_run.job_name} failed!"
f"Error: {context.failure_event.message}"
)
Expand Down

0 comments on commit e604bfa

Please sign in to comment.