Edgar Rodriguez created AIRFLOW-1464:
----------------------------------------

             Summary: Improve performance on getting dag run tis in backfill job
                 Key: AIRFLOW-1464
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-1464
             Project: Apache Airflow
          Issue Type: Improvement
          Components: backfill
            Reporter: Edgar Rodriguez


Improve the way task instances are retrieved, using batch query on TIs. 
The following code snippet needs to be improved:
{code}
for ti in dag_run.get_task_instances():
    # all tasks part of the backfill are scheduled to run
    if ti.state == State.NONE:
        ti.set_state(State.SCHEDULED, session=session)
{code}




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to