-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
asyncio support #32
asyncio support #32
Conversation
Hello, @aviklai ! I've been trying to use the async version you've provided in this fork and have been having some difficulties in making it work, would you be able to provide any ideas of what may be the cause? I use a standard async grpc with reflection: import asyncio
import grpc
from grpc_reflection.v1alpha import reflection
from concurrent import futures
from py_grpc_prometheus.prometheus_aio_server_interceptor import PromAioServerInterceptor
server = grpc.aio.server(
futures.ThreadPoolExecutor(max_workers=1000),
options=[
('grpc.max_send_message_length', 400000000),
('grpc.max_receive_message_length', 400000000)
],
interceptors=(PromAioServerInterceptor(legacy=True),)
)
start_http_server(9090)
api_pb2_grpc.add_DWHApiServicer_to_server(dwhrc_servicer, server)
service_names = (
api_pb2.DESCRIPTOR.services_by_name['DWHApi'].full_name,
reflection.SERVICE_NAME,
)
reflection.enable_server_reflection(service_names, server)
server.add_insecure_port('[::]:50051') However, when trying to execute a request (sent via grpcurl), the server fails with the following error:
|
@tesserata Hi, Never tried this with server reflection. |
@aviklai Now at the stage of writing tests. https://gist.github.com/Roktober/61140e1d817e565d8521082d9a9bba22 |
@Roktober Hi, Thanks but the metrics calculation is not my implementation. |
#13
Couple of open issues: