Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from datetime import datetime, timedelta, timezone
from airflow import DAG
from airflow.providers.amazon.aws.operators.ecs import EcsRunTaskOperator
from airflow.providers.slack.notifications.slack import send_slack_notification
from utils.slack import on_failure_callback

from airflow.operators.latest_only import LatestOnlyOperator
Expand Down Expand Up @@ -52,7 +53,13 @@
},
},
task_concurrency=10,
on_failure_callback=on_failure_callback,
on_failure_callback=[send_slack_notification(
text="⚠️ The task {{ ti.task_id }} failed,"
" but its ok. PVNET-ECMWF only will run next. "
"No out of hours support is required. ⚠️",
channel=f"tech-ops-airflow-{env}",
username="Airflow",
)],
awslogs_group="/aws/ecs/forecast/forecast_pvnet",
awslogs_stream_prefix="streaming/forecast_pvnet-forecast",
awslogs_region="eu-west-1",
Expand Down