I have two tasks in an Airflow DAG like below.
def check_condition(**kwargs):
# do something
return True # or return False
task1 = PythonOperator(
task_id='condition_task',
python_callable=check_condition,
provide_context=True,
dag=dag
)
task2 = DummyOperator(
task_id='following_task',
dag=dag
)
What should I do to make
task 2 invoked only when the return value of task 1 is True?