From c2fe5a6adcf0257270ea21e71f73527f7558e646 Mon Sep 17 00:00:00 2001 From: Radovan Zivkovic Date: Mon, 17 Jun 2024 14:21:51 +0200 Subject: [PATCH] Use partial import form utils --- rasa_sdk/grpc_server.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rasa_sdk/grpc_server.py b/rasa_sdk/grpc_server.py index 5fce7dc8a..ebbf26735 100644 --- a/rasa_sdk/grpc_server.py +++ b/rasa_sdk/grpc_server.py @@ -5,7 +5,6 @@ import asyncio import grpc -import utils import logging import ssl import types @@ -36,6 +35,7 @@ get_tracer_and_context, TracerProvider, ) +from rasa_sdk.utils import check_version_compatibility, number_of_sanic_workers logger = logging.getLogger(__name__) @@ -71,7 +71,7 @@ async def webhook( self.tracer_provider, request ) with tracer.start_as_current_span(span_name, context=tracer_context): - utils.check_version_compatibility(request.version) + check_version_compatibility(request.version) try: action_call = MessageToDict(request, preserving_proto_field_name=True) result = await self.executor.run(action_call) @@ -155,7 +155,7 @@ async def run_grpc( ssl_password: Password for the SSL key file. endpoints: Path to the endpoints file. """ - workers = utils.number_of_sanic_workers() + workers = number_of_sanic_workers() server = aio.server(futures.ThreadPoolExecutor(max_workers=workers)) initialise_interrupts(server) executor = ActionExecutor()