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/12/05 21:43:31 UTC

[GitHub] [airflow] msb217 commented on a change in pull request #6652: [AIRFLOW-5548] [AIRFLOW-5550] REST API enhancement - dag info, task …

msb217 commented on a change in pull request #6652: [AIRFLOW-5548] [AIRFLOW-5550] REST API enhancement - dag info, task …
URL: https://github.com/apache/airflow/pull/6652#discussion_r354562455
 
 

 ##########
 File path: airflow/api/common/experimental/__init__.py
 ##########
 @@ -45,3 +45,10 @@ def check_and_get_dagrun(dag: DagModel, execution_date: datetime) -> DagRun:
                          .format(execution_date, dag.dag_id))
         raise DagRunNotFound(error_message)
     return dagrun
+
+
+def check_and_get_dags():
+    """Get the dag ids present in the dagbag"""
+    dagbag = DagBag()
 
 Review comment:
   You're right - using the DB session instead of `DagBag()` significantly reduced request time. I have removed the `check_and_get_dags()` function as well.

----------------------------------------------------------------
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