Skip to content

Commit 0506efe

Browse files
Dario-koltuAndrewShakinovsky-SAS
authored andcommitted
Update sas_studio.py
Adding the possibility to use own functions in parameter "on_failure_callback".
1 parent 0b1cb41 commit 0506efe

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/sas_airflow_provider/operators/sas_studio.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,12 @@ def __init__(
146146

147147
# Use hooks to clean up
148148
self.on_success_callback=[on_success]
149-
self.on_failure_callback=[on_failure]
149+
150+
if self.on_failure_callback == None:
151+
self.on_failure_callback=[on_failure]
152+
else:
153+
self.on_failure_callback=[on_failure, self.on_failure_callback]
154+
150155
self.on_retry_callback=[on_retry]
151156

152157
# Timeout

0 commit comments

Comments
 (0)