Move to using futurist library for taskflow executors
Move to using the futurist library instead of built-in taskflow types and utils as it replaces the taskflow library. Closes-Bug: #1477260 Change-Id: I39761b390198967e65ebda1be45d920195491114
This commit is contained in:
parent
e5c591ec0f
commit
cb281c76c9
@ -15,14 +15,13 @@
|
|||||||
|
|
||||||
import contextlib
|
import contextlib
|
||||||
|
|
||||||
|
import futurist
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from oslo_utils import excutils
|
from oslo_utils import excutils
|
||||||
from stevedore import driver
|
from stevedore import driver
|
||||||
from taskflow import engines
|
from taskflow import engines
|
||||||
from taskflow.listeners import logging as llistener
|
from taskflow.listeners import logging as llistener
|
||||||
from taskflow.types import futures
|
|
||||||
from taskflow.utils import eventlet_utils
|
|
||||||
|
|
||||||
import glance.async
|
import glance.async
|
||||||
from glance.common.scripts import utils as script_utils
|
from glance.common.scripts import utils as script_utils
|
||||||
@ -77,10 +76,10 @@ class TaskExecutor(glance.async.TaskExecutor):
|
|||||||
yield None
|
yield None
|
||||||
else:
|
else:
|
||||||
max_workers = CONF.taskflow_executor.max_workers
|
max_workers = CONF.taskflow_executor.max_workers
|
||||||
if eventlet_utils.EVENTLET_AVAILABLE:
|
try:
|
||||||
yield futures.GreenThreadPoolExecutor(max_workers=max_workers)
|
yield futurist.GreenThreadPoolExecutor(max_workers=max_workers)
|
||||||
else:
|
except RuntimeError:
|
||||||
yield futures.ThreadPoolExecutor(max_workers=max_workers)
|
yield futurist.ThreadPoolExecutor(max_workers=max_workers)
|
||||||
|
|
||||||
def _get_flow(self, task):
|
def _get_flow(self, task):
|
||||||
try:
|
try:
|
||||||
|
@ -28,6 +28,7 @@ oslo.context>=0.2.0 # Apache-2.0
|
|||||||
oslo.service>=0.1.0 # Apache-2.0
|
oslo.service>=0.1.0 # Apache-2.0
|
||||||
oslo.utils>=1.9.0 # Apache-2.0
|
oslo.utils>=1.9.0 # Apache-2.0
|
||||||
stevedore>=1.5.0 # Apache-2.0
|
stevedore>=1.5.0 # Apache-2.0
|
||||||
|
futurist>=0.1.2 # Apache-2.0
|
||||||
taskflow>=1.16.0
|
taskflow>=1.16.0
|
||||||
keystonemiddleware>=2.0.0
|
keystonemiddleware>=2.0.0
|
||||||
WSME>=0.7
|
WSME>=0.7
|
||||||
|
Loading…
Reference in New Issue
Block a user