mik-laj commented on a change in pull request #7674: [AIRFLOW-7022] Simplify 
DagFileProcessor.process_file method
URL: https://github.com/apache/airflow/pull/7674#discussion_r390285608
 
 

 ##########
 File path: airflow/jobs/scheduler_job.py
 ##########
 @@ -852,16 +847,16 @@ def process_file(
 
         paused_dag_ids = DagModel.get_paused_dag_ids(dag_ids=dagbag.dag_ids)
 
+        active_dags = [dag for dag_id, dag in dagbag.dags.items() if dag_id 
not in paused_dag_ids]
+
         # Pickle the DAGs (if necessary) and put them into a SimpleDag
-        for dag_id, dag in dagbag.dags.items():
-            # Only return DAGs that are not paused
-            if dag_id not in paused_dag_ids:
-                pickle_id = None
-                if pickle_dags:
-                    pickle_id = dag.pickle(session).id
-                simple_dags.append(SimpleDag(dag, pickle_id=pickle_id))
-
-        dags = self._find_dags_to_process(dagbag.dags.values(), paused_dag_ids)
+        for dag in active_dags:
+            pickle_id = None
+            if pickle_dags:
+                pickle_id = dag.pickle(session).id
 
 Review comment:
   Done.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to