From 0506efe6741d0fe466f019617092f9812f8ecfdf Mon Sep 17 00:00:00 2001 From: Dario-koltu <71376625+Dario-koltu@users.noreply.github.com> Date: Mon, 12 Feb 2024 11:56:16 +0100 Subject: [PATCH] Update sas_studio.py Adding the possibility to use own functions in parameter "on_failure_callback". --- src/sas_airflow_provider/operators/sas_studio.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/sas_airflow_provider/operators/sas_studio.py b/src/sas_airflow_provider/operators/sas_studio.py index b6c9d5b..aefcf8f 100644 --- a/src/sas_airflow_provider/operators/sas_studio.py +++ b/src/sas_airflow_provider/operators/sas_studio.py @@ -146,7 +146,12 @@ def __init__( # Use hooks to clean up self.on_success_callback=[on_success] - self.on_failure_callback=[on_failure] + + if self.on_failure_callback == None: + self.on_failure_callback=[on_failure] + else: + self.on_failure_callback=[on_failure, self.on_failure_callback] + self.on_retry_callback=[on_retry] # Timeout