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 44from airflow .providers .amazon .aws .operators .ecs import EcsRunTaskOperator
55from airflow .decorators import dag
66from airflow .operators .bash import BashOperator
7+ from airflow .providers .slack .notifications .slack import send_slack_notification
78
89from airflow .operators .latest_only import LatestOnlyOperator
910from utils .slack import on_failure_callback
5960 },
6061 },
6162 task_concurrency = 10 ,
62- on_failure_callback = on_failure_callback ,
63+ on_failure_callback = [send_slack_notification (
64+ text = "⚠️ The task {{ ti.task_id }} failed,"
65+ " but its ok. The forecast will automatically move over to a PVNET-ECMWF. "
66+ "No out of hours support is required. ⚠️" ,
67+ channel = f"tech-ops-airflow-{ env } " ,
68+ username = "Airflow" ,
69+ )],
6370 awslogs_group = "/aws/ecs/consumer/sat" ,
6471 awslogs_stream_prefix = "streaming/sat-consumer" ,
6572 awslogs_region = "eu-west-1" ,
You can’t perform that action at this time.
0 commit comments