diff --git a/jina/serve/runtimes/worker/request_handling.py b/jina/serve/runtimes/worker/request_handling.py index 9b1bee592becd..7e954efd53186 100644 --- a/jina/serve/runtimes/worker/request_handling.py +++ b/jina/serve/runtimes/worker/request_handling.py @@ -178,7 +178,6 @@ def call_handle(request): ] return self.process_single_data(request, None, is_generator=is_generator) - app = get_fastapi_app( request_models_map=request_models_map, caller=call_handle, **kwargs ) @@ -187,7 +186,9 @@ def call_handle(request): async def _shutdown(): await self.close() - return app + from jina.helper import extend_rest_interface + + return extend_rest_interface(app) def _http_fastapi_sagemaker_app(self, **kwargs): from jina.serve.runtimes.worker.http_sagemaker_app import get_fastapi_app diff --git a/tests/conftest.py b/tests/conftest.py index 47d5c96db4703..3a7d007bb4fd8 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -60,7 +60,7 @@ def test_log_level(monkeypatch): @pytest.fixture(autouse=True) -def test_grpc_fork_support_false(monkeypatch): +def test_grpc_fork_support_true(monkeypatch): monkeypatch.setenv('GRPC_ENABLE_FORK_SUPPORT', 'true') @@ -94,4 +94,4 @@ def set_test_pip_version() -> None: os.environ['JINA_GATEWAY_IMAGE'] = 'jinaai/jina:test-pip' yield if 'JINA_GATEWAY_IMAGE' in os.environ: # maybe another fixture has already removed - del os.environ['JINA_GATEWAY_IMAGE'] \ No newline at end of file + del os.environ['JINA_GATEWAY_IMAGE']