Merge "Don't use eventlet.monkey_patch under wsgi"

This commit is contained in:
Zuul 2020-01-09 12:54:51 +00:00 committed by Gerrit Code Review
commit e986812dc9
2 changed files with 7 additions and 7 deletions

View File

@ -13,9 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import eventlet
eventlet.monkey_patch()
from oslo_config import cfg
import oslo_middleware.cors as cors_middleware
import oslo_middleware.http_proxy_to_wsgi as http_proxy_to_wsgi_middleware

View File

@ -21,9 +21,6 @@ import wsmeext.pecan as wsme_pecan
from mistral.api import access_control as acl
from mistral.api.controllers.v2 import resources
# TODO(rakhmerov): invalid dependency, a REST controller must not depend on
# a launch script.
from mistral.cmd import launch
from mistral import context
from mistral import exceptions as exc
from mistral.service import coordination
@ -53,8 +50,14 @@ class ServicesController(rest.RestController):
"Failed to connect to coordination backend."
)
# Should be the same as LAUNCH_OPTIONS in launch.py
# At the moment there is a duplication, need to solve it.
# We cannot depend on launch.py since it uses eventlet monkey patch
# under wsgi it causes problems
mistral_services = {'api', 'engine', 'executor',
'event-engine', 'notifier'}
services_list = []
service_group = ['%s_group' % i for i in launch.LAUNCH_OPTIONS]
service_group = ['%s_group' % i for i in mistral_services]
try:
for group in service_group: