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. Roughly 50ms to 5ms when running Airflow locally and 
using the init dags for testing. 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:
[email protected]


With regards,
Apache Git Services

Reply via email to