这里
https://www.yuque.com/bobby-zpcyu/fgmqcv/enncpo
我看完这节课 感觉有点问题 ( 可能后面几节课看完就迎刃而解 )
但是还是忍不住想问一下
python下超时重试机制
我加了个 打印 没出现重试这个机制啊
当你 设置了 超时参数后
with grpc.insecure_channel('localhost:50051') as channel:
intercept_channel = grpc.intercept_channel(channel, default_value_interceptor, retry_interceptor)
stub = helloworld_pb2_grpc.GreeterStub(intercept_channel)
response = stub.SayHello(helloworld_pb2.HelloRequest(name='you'), timeout=1)
没等你重试 它就报错了 然后就结束进程了
导致你 重试根本没有任何用处
第二个 问题:
intercept_unary_stream 函数有什么用吗 起到了什么用处
看了过去 只看到 intercept_unary_unary 运行到了