Skip to content

Commit

Permalink
Update sas_studio.py
Browse files Browse the repository at this point in the history
Adding the possibility to use own functions in parameter "on_failure_callback".
  • Loading branch information
Dario-koltu authored and AndrewShakinovsky-SAS committed Feb 12, 2024
1 parent 0b1cb41 commit 0506efe
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/sas_airflow_provider/operators/sas_studio.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0506efe

Please sign in to comment.