Skip to content

Commit bf8a054

Browse files
committed
sat specific message
1 parent e8a3ca5 commit bf8a054

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

terraform/modules/services/airflow/dags/uk/satellite-dag.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from airflow.providers.amazon.aws.operators.ecs import EcsRunTaskOperator
55
from airflow.decorators import dag
66
from airflow.operators.bash import BashOperator
7+
from airflow.providers.slack.notifications.slack import send_slack_notification
78

89
from airflow.operators.latest_only import LatestOnlyOperator
910
from utils.slack import on_failure_callback
@@ -59,7 +60,13 @@
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",

0 commit comments

Comments
 (0)