airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject [3/7] incubator-airflow git commit: [AIRFLOW-785] Don't import CgroupTaskRunner at global scope
Date Sun, 22 Jan 2017 16:38:54 GMT
[AIRFLOW-785] Don't import CgroupTaskRunner at global scope

cgroups is not a required dependency


Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/1a801cc3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/1a801cc3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/1a801cc3

Branch: refs/heads/v1-8-test
Commit: 1a801cc3b4e5263278a780df59f30f72c21597dc
Parents: cce6ffc
Author: George Sakkis <george.sakkis@gmail.com>
Authored: Sat Jan 21 14:48:06 2017 +0200
Committer: George Sakkis <george.sakkis@gmail.com>
Committed: Sun Jan 22 14:55:37 2017 +0200

----------------------------------------------------------------------
 airflow/task_runner/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/1a801cc3/airflow/task_runner/__init__.py
----------------------------------------------------------------------
diff --git a/airflow/task_runner/__init__.py b/airflow/task_runner/__init__.py
index f134e8e..e0527cb 100644
--- a/airflow/task_runner/__init__.py
+++ b/airflow/task_runner/__init__.py
@@ -13,7 +13,6 @@
 # limitations under the License.
 
 from airflow import configuration
-from airflow.contrib.task_runner.cgroup_task_runner import CgroupTaskRunner
 from airflow.task_runner.bash_task_runner import BashTaskRunner
 from airflow.exceptions import AirflowException
 
@@ -33,6 +32,7 @@ def get_task_runner(local_task_job):
     if _TASK_RUNNER == "BashTaskRunner":
         return BashTaskRunner(local_task_job)
     elif _TASK_RUNNER == "CgroupTaskRunner":
+        from airflow.contrib.task_runner.cgroup_task_runner import CgroupTaskRunner
         return CgroupTaskRunner(local_task_job)
     else:
         raise AirflowException("Unknown task runner type {}".format(_TASK_RUNNER))


Mime
View raw message