From 3d151117b2ea5ed066452898516952c6f3154094 Mon Sep 17 00:00:00 2001 From: sydneynotthecity Date: Mon, 19 Aug 2024 09:43:06 -0500 Subject: [PATCH] Add Sentry failure callback to custom python operator --- dags/stellar_etl_airflow/build_del_ins_operator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dags/stellar_etl_airflow/build_del_ins_operator.py b/dags/stellar_etl_airflow/build_del_ins_operator.py index 2e1b7156..54ba00ce 100644 --- a/dags/stellar_etl_airflow/build_del_ins_operator.py +++ b/dags/stellar_etl_airflow/build_del_ins_operator.py @@ -1,5 +1,5 @@ from airflow.operators.python import PythonOperator - +from stellar_etl_airflow.default import alert_after_max_retries def initialize_task_vars( table_id, @@ -70,5 +70,6 @@ def create_del_ins_task(dag, task_vars, del_ins_callable): python_callable=del_ins_callable, op_kwargs=task_vars, provide_context=True, + on_failure_callback=alert_after_max_retries, dag=dag, )