You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Ben Tallman (JIRA)" <ji...@apache.org> on 2016/10/19 17:57:58 UTC

[jira] [Created] (AIRFLOW-582) ti.get_dagrun() should not filter on start_date

Ben Tallman created AIRFLOW-582:
-----------------------------------

             Summary: ti.get_dagrun() should not filter on start_date
                 Key: AIRFLOW-582
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-582
             Project: Apache Airflow
          Issue Type: Bug
            Reporter: Ben Tallman


The filter in ti.get_dagrun should not include start_date, it should only search on execution_date.

    @provide_session
    def get_dagrun(self, session):
        """
        Returns the DagRun for this TaskInstance
        :param session:
        :return: DagRun
        """
        dr = session.query(DagRun).filter(
            DagRun.dag_id == self.dag_id,
            DagRun.execution_date == self.execution_date,
            DagRun.start_date == self.start_date
        ).first()

        return dr




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)