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/02/01 15:55:17 UTC

[07/14] incubator-airflow git commit: [AIRFLOW-813] Fix unterminated unit tests in SchedulerJobTest

[AIRFLOW-813] Fix unterminated unit tests in SchedulerJobTest

Closes #2032 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/3ca287d8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/3ca287d8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/3ca287d8

Branch: refs/heads/v1-8-test
Commit: 3ca287d874fff0d39cb5d86f1ef8f3c62fea44e4
Parents: 9d9e56d
Author: Feng Lu <fe...@fengcloud.hot.corp.google.com>
Authored: Sat Jan 28 16:44:43 2017 +0100
Committer: Bolke de Bruin <bo...@xs4all.nl>
Committed: Sat Jan 28 16:44:43 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/3ca287d8/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/3ca287d8/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