Skip to content

Commit

Permalink
Use default_arg success callback & define a separate callback function
Browse files Browse the repository at this point in the history
  • Loading branch information
pankajkoti committed Oct 21, 2024
1 parent ed59082 commit 56003df
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/example_dag_factory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ default:
end_date: 2018-03-05
retries: 1
retry_delay_sec: 300
on_success_callback_name: print_hello_from_callback
on_success_callback_file: $CONFIG_ROOT_DIR/print_hello.py
concurrency: 1
max_active_runs: 1
dagrun_timeout_sec: 600
default_view: "tree"
orientation: "LR"
schedule_interval: "0 1 * * *"
on_success_callback_name: print_hello
on_success_callback_file: $CONFIG_ROOT_DIR/print_hello.py
on_failure_callback_name: print_hello
on_failure_callback_name: print_hello_from_callback
on_failure_callback_file: $CONFIG_ROOT_DIR/print_hello.py

example_dag:
Expand Down
4 changes: 4 additions & 0 deletions examples/print_hello.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
def print_hello():
print("hello")


def print_hello_from_callback(context):
print("hello from callback")

0 comments on commit 56003df

Please sign in to comment.