Skip to content
Snippets Groups Projects
Verified Commit daa3b388 authored by Karel van Klink's avatar Karel van Klink :smiley_cat:
Browse files

Update signature of email notification steps

parent 8d0e9017
No related branches found
No related tags found
1 merge request!379Fix serialization problem in email notification task
Pipeline #92498 passed
......@@ -34,11 +34,11 @@ def gather_failed_tasks() -> State:
@step("Send notification email for failed tasks")
def send_email_notification(state: State) -> None:
def send_email_notification(failed_tasks: list[dict]) -> None:
"""Send out an email notification for all tasks that have failed."""
general_settings = load_oss_params().GENERAL
all_alerts = ""
for failure in state["failed_tasks"]:
for failure in failed_tasks:
failed_task_url = f"{general_settings.public_hostname}/workflows/{failure["process_id"]}"
failed_subscription = get_subscription_by_process_id(failure["process_id"])
all_alerts = f"{all_alerts}------\n\n"
......@@ -63,11 +63,11 @@ def send_email_notification(state: State) -> None:
@step("Send notification emails for failed prefix list tasks")
def send_prefix_list_email_notification(state: State) -> None:
def send_prefix_list_email_notification(failed_prefix_list_checks: list[dict]) -> None:
"""Send out an email notification for all prefix list validation tasks that have failed."""
general_settings = load_oss_params().GENERAL
all_alerts = ""
for failure in state["failed_prefix_list_checks"]:
for failure in failed_prefix_list_checks:
failed_task_url = f"{general_settings.public_hostname}/workflows/{failure["process_id"]}"
failed_subscription = get_subscription_by_process_id(failure["process_id"])
all_alerts = f"{all_alerts}------\n\n"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment