Repository: incubator-airflow Updated Branches: refs/heads/master 18f8498a7 -> 84215b367
[AIRFLOW-1397][AIRFLOW-1] No Last Run column data displyed in Airflow UI 1.8.1 Closes #2430 from preete-dixit-ck/master Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/84215b36 Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/84215b36 Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/84215b36 Branch: refs/heads/master Commit: 84215b36773fd6b3062dbbdec2e7c21067dedda6 Parents: 18f8498 Author: Preete Dixit <[email protected]> Authored: Wed Aug 2 17:31:57 2017 -0700 Committer: Alex Guziel <[email protected]> Committed: Wed Aug 2 17:31:57 2017 -0700 ---------------------------------------------------------------------- airflow/models.py | 3 +-- airflow/www/api/experimental/endpoints.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/84215b36/airflow/models.py ---------------------------------------------------------------------- diff --git a/airflow/models.py b/airflow/models.py index 6e423dc..959d475 100755 --- a/airflow/models.py +++ b/airflow/models.py @@ -4454,13 +4454,12 @@ class DagRun(Base): @classmethod @provide_session def get_latest_runs(cls, session): - """Returns the latest running DagRun for each DAG. """ + """Returns the latest DagRun for each DAG. """ subquery = ( session .query( cls.dag_id, func.max(cls.execution_date).label('execution_date')) - .filter(cls.state == State.RUNNING) .group_by(cls.dag_id) .subquery() ) http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/84215b36/airflow/www/api/experimental/endpoints.py ---------------------------------------------------------------------- diff --git a/airflow/www/api/experimental/endpoints.py b/airflow/www/api/experimental/endpoints.py index a8d7f5c..3e0ff46 100644 --- a/airflow/www/api/experimental/endpoints.py +++ b/airflow/www/api/experimental/endpoints.py @@ -156,7 +156,7 @@ def task_instance_info(dag_id, execution_date, task_id): @api_experimental.route('/latest_runs', methods=['GET']) @requires_authentication def latest_dag_runs(): - """Returns the latest running DagRun for each DAG formatted for the UI. """ + """Returns the latest DagRun for each DAG formatted for the UI. """ from airflow.models import DagRun dagruns = DagRun.get_latest_runs() payload = []
