Skip to content

Commit 81784ce

Browse files
test version
1 parent 95214bf commit 81784ce

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

archipy/helpers/utils/app_utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,16 +309,18 @@ def create_fastapi_app(
309309
return app
310310

311311
@classmethod
312-
def create_async_grpc_app(cls, config: BaseConfig) -> server:
312+
def create_async_grpc_app(cls, config: BaseConfig, interceptors: set[Any]) -> server:
313313
"""Create and configure an async gRPC application."""
314314
from archipy.helpers.interceptors.grpc.exception import AsyncGrpcServerExceptionInterceptor
315315

316316
async_interceptors = [AsyncGrpcServerExceptionInterceptor()]
317+
async_interceptors.extend(interceptors)
317318
AsyncGrpcAPIUtils.setup_trace_interceptor(config, async_interceptors)
318319
AsyncGrpcAPIUtils.setup_metric_interceptor(config, async_interceptors)
319320

320321
app = server(
321322
futures.ThreadPoolExecutor(max_workers=config.GRPC.THREAD_WORKER_COUNT),
322323
interceptors=async_interceptors,
323324
)
325+
324326
return app

0 commit comments

Comments
 (0)