Skip to content

Instantly share code, notes, and snippets.

@plieningerweb
Created July 3, 2017 11:18
Show Gist options
  • Save plieningerweb/4705cca48d5d17021e99e6da042510f7 to your computer and use it in GitHub Desktop.
Save plieningerweb/4705cca48d5d17021e99e6da042510f7 to your computer and use it in GitHub Desktop.
runonce = RunOnceBranchOperator(
dag=dag,
task_id='runonce_example',
run_once_task_id='downstream_task_id_to_run_once',
skip_task_id='dummy_task_id_used_to_skip_other_task',
)
runonce.set_downstream(downstream_to_run_once)
runonce.set_downstream(dummy_task_used_to_skip_other_task)
join = DummyOperator(
task_id='join',
# important
trigger_rule='one_success',
dag=dag
)
join.set_upstream(downstream_to_run_once)
join.set_upstream(dummy_task_used_to_skip_other_task)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment