Fokko commented on a change in pull request #7489: [AIRFLOW-6869][WIP] Bulk 
fetch DAGRuns for _process_task_instances
URL: https://github.com/apache/airflow/pull/7489#discussion_r383706008
 
 

 ##########
 File path: airflow/jobs/scheduler_job.py
 ##########
 @@ -631,16 +632,16 @@ def create_dag_run(self, dag, session=None):
                 return next_run
 
     @provide_session
-    def _process_task_instances(self, dag, task_instances_list, session=None):
+    def _process_task_instances(self, dag, dag_runs, session=None):
         """
         This method schedules the tasks for a single DAG by looking at the
         active DAG runs and adding task instances that should run to the
         queue.
         """
 
         # update the state of the previously active dag runs
-        dag_runs = DagRun.find(dag_id=dag.dag_id, state=State.RUNNING, 
session=session)
         active_dag_runs = 0
+        task_instances_list = []
 
 Review comment:
   Nice one, this makes the function far less awkward 

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