jmcarp commented on a change in pull request #4396: [WIP][AIRFLOW-3585] - 
Adding edges to database
URL: https://github.com/apache/incubator-airflow/pull/4396#discussion_r244433811
 
 

 ##########
 File path: airflow/www/views.py
 ##########
 @@ -1531,22 +1539,13 @@ def graph(self, session=None):
                 }
             })
 
-        def get_upstream(task):
-            for t in task.upstream_list:
-                edge = {
-                    'u': t.task_id,
-                    'v': task.task_id,
-                }
-                if edge not in edges:
-                    edges.append(edge)
-                    get_upstream(t)
-
-        for t in dag.roots:
-            get_upstream(t)
-
-        dt_nr_dr_data = get_date_time_num_runs_dag_runs_form_data(request, 
session, dag)
-        dt_nr_dr_data['arrange'] = arrange
-        dttm = dt_nr_dr_data['dttm']
+        for edge in session.query(models.DagEdge)\
 
 Review comment:
   Just a style question, but WDYT about expressing this as a comprehension 
like `task_instances_dict` and `ops` below for consistency?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to