Repository: incubator-airflow Updated Branches: refs/heads/master 5a7f0b2e5 -> 51fed8b1f
[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. Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/ba5b67b6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/ba5b67b6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/ba5b67b6 Branch: refs/heads/master Commit: ba5b67b6c99e0bfb0f827518cdb31b5eb5a5a626 Parents: 7f2bc0d Author: Kevin Yuen <[email protected]> Authored: Sat Jul 21 12:38:21 2018 -0400 Committer: Kevin Yuen <[email protected]> Committed: Sat Jul 21 12:51:53 2018 -0400 ---------------------------------------------------------------------- airflow/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/ba5b67b6/airflow/models.py ---------------------------------------------------------------------- diff --git a/airflow/models.py b/airflow/models.py index 57ef9d3..68a502d 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(
