File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
terraform/modules/services/airflow/dags/uk Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 22from datetime import datetime , timedelta , timezone
33from airflow import DAG
44from airflow .providers .amazon .aws .operators .ecs import EcsRunTaskOperator
5+ from airflow .providers .slack .notifications .slack import send_slack_notification
56from utils .slack import on_failure_callback
67
78from airflow .operators .latest_only import LatestOnlyOperator
5253 },
5354 },
5455 task_concurrency = 10 ,
55- on_failure_callback = on_failure_callback ,
56+ on_failure_callback = [send_slack_notification (
57+ text = "⚠️ The task {{ ti.task_id }} failed,"
58+ " but its ok. PVNET-ECMWF only will run next. "
59+ "No out of hours support is required. ⚠️" ,
60+ channel = f"tech-ops-airflow-{ env } " ,
61+ username = "Airflow" ,
62+ )],
5663 awslogs_group = "/aws/ecs/forecast/forecast_pvnet" ,
5764 awslogs_stream_prefix = "streaming/forecast_pvnet-forecast" ,
5865 awslogs_region = "eu-west-1" ,
You can’t perform that action at this time.
0 commit comments