Browse Source

Using futurist to solve python3 issues

Change-Id: Ibc0beee562905ba93660116799b3f0eb5b7e7b8a
changes/44/680444/5
jiaopengju 2 years ago
committed by Jiao Pengju
parent
commit
93c24b6f31
3 changed files with 4 additions and 3 deletions
  1. +2
    -2
      karbor/services/operationengine/engine/executors/thread_pool_executor.py
  2. +1
    -1
      lower-constraints.txt
  3. +1
    -0
      requirements.txt

+ 2
- 2
karbor/services/operationengine/engine/executors/thread_pool_executor.py View File

@ -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()


+ 1
- 1
lower-constraints.txt View File

@ -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


+ 1
- 0
requirements.txt View File

@ -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

Loading…
Cancel
Save