Repository: incubator-airflow Updated Branches: refs/heads/v1-10-stable fc00875ed -> 64dacb1ca
[AIRFLOW-2778] Explicit import for dag_processing.list_py_file_paths The use of utils.dag_processing.list_py_file_paths causes a failure if utils.dag_processing is not already loaded indirectly. (cherry picked from commit ba5b67b6c99e0bfb0f827518cdb31b5eb5a5a626) Signed-off-by: Ash Berlin-Taylor <[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/64dacb1c Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/64dacb1c Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/64dacb1c Branch: refs/heads/v1-10-stable Commit: 64dacb1ca319443f06e4860b817888946943c8f1 Parents: fc00875 Author: Kevin Yuen <[email protected]> Authored: Sat Jul 21 12:38:21 2018 -0400 Committer: Ash Berlin-Taylor <[email protected]> Committed: Sun Jul 22 13:16:45 2018 +0100 ---------------------------------------------------------------------- airflow/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/64dacb1c/airflow/models.py ---------------------------------------------------------------------- diff --git a/airflow/models.py b/airflow/models.py index cb0165a..6b244cd 100755 --- a/airflow/models.py +++ b/airflow/models.py @@ -79,6 +79,7 @@ from airflow.ti_deps.deps.trigger_rule_dep import TriggerRuleDep from airflow.ti_deps.dep_context import DepContext, QUEUE_DEPS, RUN_DEPS from airflow.utils import timezone +from airflow.utils.dag_processing import list_py_file_paths from airflow.utils.dates import cron_presets, date_range as utils_date_range from airflow.utils.db import provide_session from airflow.utils.decorators import apply_defaults @@ -520,7 +521,7 @@ class DagBag(BaseDagBag, LoggingMixin): stats = [] FileLoadStat = namedtuple( 'FileLoadStat', "file duration dag_num task_num dags") - for filepath in utils.dag_processing.list_py_file_paths(dag_folder): + for filepath in list_py_file_paths(dag_folder): try: ts = timezone.utcnow() found_dags = self.process_file(
