Repository: incubator-airflow Updated Branches: refs/heads/v1-8-test 40442e58f -> 1060ade28
[AIRFLOW-812] Fix the scheduler termination bug. When checking max-runs for dag_files the scheduler would stop immediately if there were no files. Closes #2027 from fenglu-g/master (cherry picked from commit f8d8ddac08dbec90b240a6b8670be9bd650dfb3b) Signed-off-by: Bolke de Bruin <bo...@xs4all.nl> Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/1060ade2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/1060ade2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/1060ade2 Branch: refs/heads/v1-8-test Commit: 1060ade28119a5e1eb81fc331689bffd37b351b3 Parents: 40442e5 Author: Feng Lu <fen...@fengcloud.hot.corp.google.com> Authored: Fri Jan 27 10:45:50 2017 +0100 Committer: Bolke de Bruin <bo...@xs4all.nl> Committed: Fri Jan 27 11:44:20 2017 +0100 ---------------------------------------------------------------------- airflow/utils/dag_processing.py | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/1060ade2/airflow/utils/dag_processing.py ---------------------------------------------------------------------- diff --git a/airflow/utils/dag_processing.py b/airflow/utils/dag_processing.py index 6209946..ef1c1ed 100644 --- a/airflow/utils/dag_processing.py +++ b/airflow/utils/dag_processing.py @@ -634,6 +634,8 @@ class DagFileProcessorManager(LoggingMixin): """ :return: whether all file paths have been processed max_runs times """ + if not self._file_paths: # No dag file is present. + return False for file_path in self._file_paths: if self._run_count[file_path] != self._max_runs: return False