airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] Fokko commented on a change in pull request #4071: [AIRFLOW-3237] Refactor example DAGs
Date Mon, 22 Oct 2018 18:38:52 GMT
Fokko commented on a change in pull request #4071: [AIRFLOW-3237] Refactor example DAGs
URL: https://github.com/apache/incubator-airflow/pull/4071#discussion_r226969880
 
 

 ##########
 File path: airflow/example_dags/example_branch_python_dop_operator_3.py
 ##########
 @@ -46,17 +48,9 @@ def should_run(ds, **kwargs):
 
 
 cond = BranchPythonOperator(
-    task_id='condition',
-    provide_context=True,
-    python_callable=should_run,
-    dag=dag)
-
-oper_1 = DummyOperator(
-    task_id='oper_1',
-    dag=dag)
-oper_1.set_upstream(cond)
-
-oper_2 = DummyOperator(
-    task_id='oper_2',
-    dag=dag)
-oper_2.set_upstream(cond)
+    task_id='condition', provide_context=True, python_callable=should_run, dag=dag
+)
+
+oper_1 = DummyOperator(task_id='oper_1', dag=dag)
 
 Review comment:
   Maybe change `oper_1` to `dummy_task_1`? This makes more sense when it shows up in the
UI.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message