You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/03/07 12:55:49 UTC

[GitHub] [airflow] ffinfo commented on a change in pull request #4863: [AIRFLOW-3841] Remove DagBag from /tree

ffinfo commented on a change in pull request #4863: [AIRFLOW-3841] Remove DagBag from /tree
URL: https://github.com/apache/airflow/pull/4863#discussion_r263369641
 
 

 ##########
 File path: airflow/www/views.py
 ##########
 @@ -1185,16 +1186,16 @@ def tree(self, session=None):
         else:
             base_date = dag.latest_execution_date or timezone.utcnow()
 
-        DR = models.DagRun
-        dag_runs = (
-            session.query(DR)
-            .filter(
-                DR.dag_id == dag.dag_id,
-                DR.execution_date <= base_date)
-            .order_by(DR.execution_date.desc())
-            .limit(num_runs)
-            .all()
-        )
+        with create_session() as session:
 
 Review comment:
   not anymore, just did remove that

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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