Reputation:
If there is an exception in Airflow I want to execute a custom function or Activity. Is it possible to do that in airflow? I also want to send the exception message to the method or activity.
Upvotes: 0
Views: 634
Reputation: 3681
For every dag and task you can define "on_failure_callback" . once you get exception in task and it failed this function is called.
for more details see : https://airflow.apache.org/docs/apache-airflow/2.2.2/logging-monitoring/callbacks.html
Upvotes: 0