diff --git a/karbor/services/operationengine/engine/executors/thread_pool_executor.py b/karbor/services/operationengine/engine/executors/thread_pool_executor.py index 2c3bbc9f..f308bb70 100644 --- a/karbor/services/operationengine/engine/executors/thread_pool_executor.py +++ b/karbor/services/operationengine/engine/executors/thread_pool_executor.py @@ -11,7 +11,7 @@ # under the License. from collections import defaultdict -from concurrent import futures +import futurist from oslo_config import cfg from oslo_log import log as logging from threading import RLock @@ -39,7 +39,7 @@ class ThreadPoolExecutor(base_executor.ScheduledOperationExecutor): if thread_count is None: thread_count = CONF.thread_count - self._pool = futures.ThreadPoolExecutor(thread_count) + self._pool = futurist.GreenThreadPoolExecutor(thread_count) self._operation_to_run = defaultdict(int) self._operation_to_cancel = set() self._lock = RLock() diff --git a/lower-constraints.txt b/lower-constraints.txt index 95b4b722..2df43ff9 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -29,7 +29,7 @@ extras==1.0.0 fasteners==0.14.1 fixtures==3.0.0 flake8==2.5.5 -futurist==1.6.0 +futurist==1.8.0 google-auth==1.4.1 greenlet==0.4.10 hacking==0.12.0 diff --git a/requirements.txt b/requirements.txt index 8553b8bc..50a82f4b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -46,3 +46,4 @@ oslo.i18n>=3.15.3 # Apache-2.0 python-swiftclient>=3.2.0 # Apache-2.0 python-karborclient>=0.6.0 # Apache-2.0 abclient>=0.2.3 # Apache-2.0 +futurist>=1.8.0 # Apache-2.0