You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by bo...@apache.org on 2017/01/27 10:44:08 UTC
incubator-airflow git commit: [AIRFLOW-812] Fix the scheduler
termination bug.
Repository: incubator-airflow
Updated Branches:
refs/heads/master 67cbb9664 -> f8d8ddac0
[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
Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/f8d8ddac
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/f8d8ddac
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/f8d8ddac
Branch: refs/heads/master
Commit: f8d8ddac08dbec90b240a6b8670be9bd650dfb3b
Parents: 67cbb96
Author: Feng Lu <fe...@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 10:45:56 2017 +0100
----------------------------------------------------------------------
airflow/utils/dag_processing.py | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/f8d8ddac/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