Repository: incubator-airflow Updated Branches: refs/heads/v1-8-test e56f627e5 -> e7f6212ca
[AIRFLOW-813] Fix unterminated unit tests in SchedulerJobTest Closes #2032 from fenglu-g/master (cherry picked from commit 3ca287d874fff0d39cb5d86f1ef8f3c62fea44e4) Signed-off-by: Bolke de Bruin <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/e7f6212c Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/e7f6212c Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/e7f6212c Branch: refs/heads/v1-8-test Commit: e7f6212cae82c3a3a0bc17bbcbc70646f67d02eb Parents: e56f627 Author: Feng Lu <[email protected]> Authored: Sat Jan 28 16:44:43 2017 +0100 Committer: Bolke de Bruin <[email protected]> Committed: Sat Jan 28 16:45:01 2017 +0100 ---------------------------------------------------------------------- airflow/bin/cli.py | 2 +- airflow/utils/dag_processing.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/e7f6212c/airflow/bin/cli.py ---------------------------------------------------------------------- diff --git a/airflow/bin/cli.py b/airflow/bin/cli.py index 46b7934..fbd86db 100755 --- a/airflow/bin/cli.py +++ b/airflow/bin/cli.py @@ -1365,7 +1365,7 @@ class CLIFactory(object): help="Set number of seconds to execute before exiting"), 'num_runs': Arg( ("-n", "--num_runs"), - default=None, type=int, + default=-1, type=int, help="Set the number of runs to execute before exiting"), # worker 'do_pickle': Arg( http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/e7f6212c/airflow/utils/dag_processing.py ---------------------------------------------------------------------- diff --git a/airflow/utils/dag_processing.py b/airflow/utils/dag_processing.py index 6ed5db7..8cf9c0f 100644 --- a/airflow/utils/dag_processing.py +++ b/airflow/utils/dag_processing.py @@ -639,6 +639,8 @@ class DagFileProcessorManager(LoggingMixin): """ :return: whether all file paths have been processed max_runs times """ + if self._max_runs == -1: # Unlimited runs. + return False for file_path in self._file_paths: if self._run_count[file_path] != self._max_runs: return False
