ashb commented on a change in pull request #6792: [AIRFLOW-5930] Use cached-SQL 
query building for hot-path queries
URL: https://github.com/apache/airflow/pull/6792#discussion_r357140421
 
 

 ##########
 File path: airflow/jobs/scheduler_job.py
 ##########
 @@ -1290,7 +1256,7 @@ def _enqueue_task_instances_with_queued_state(self, 
simple_dag_bag,
         """
         TI = models.TaskInstance
         # actually enqueue them
-        for simple_task_instance in simple_task_instances:
+        for i, simple_task_instance in enumerate(simple_task_instances):
 
 Review comment:
   Used by the `return` -- basically this avoids iterating over the loop, and 
then counting the length of the loop again.
   
   _This_ might have been why I wanted to avoid the `len()` call, in my large 
dags there are 1000s of dags. But I suspect this was me just making stuff up 
that isn't really needed :D 

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