Repository: incubator-airflow Updated Branches: refs/heads/master 32d15a348 -> f77a93191
[AIRFLOW-1499] Eliminate duplicate and unneeded code Closes #2509 from bananarepublic/airflow-1499 Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/f77a9319 Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/f77a9319 Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/f77a9319 Branch: refs/heads/master Commit: f77a93191d700c60559d75b960329703af7615d6 Parents: 32d15a3 Author: Tatsiana Klionskaya <tatsiana_klionsk...@epam.com> Authored: Mon May 28 16:27:02 2018 +0200 Committer: Fokko Driesprong <fokkodriespr...@godatadriven.com> Committed: Mon May 28 16:27:02 2018 +0200 ---------------------------------------------------------------------- airflow/www/views.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/f77a9319/airflow/www/views.py ---------------------------------------------------------------------- diff --git a/airflow/www/views.py b/airflow/www/views.py index c36d55f..4860dbd 100644 --- a/airflow/www/views.py +++ b/airflow/www/views.py @@ -1673,10 +1673,12 @@ class Airflow(BaseView): x[task.task_id] = [] for ti in task.get_task_instances(session, start_date=min_date, end_date=base_date): - ts = ti.execution_date - if dag.schedule_interval and dag.following_schedule(ts): - ts = dag.following_schedule(ts) if ti.end_date: + ts = ti.execution_date + following_schedule = dag.following_schedule(ts) + if dag.schedule_interval and following_schedule: + ts = following_schedule + dttm = wwwutils.epoch(ti.execution_date) secs = (ti.end_date - ts).total_seconds() x[ti.task_id].append(dttm)