File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments