File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,9 @@ class Timeout(BaseModel):
5656 query : Union [int , float ] = Field (default = 30 , ge = 0 )
5757 insert : Union [int , float ] = Field (default = 90 , ge = 0 )
5858 init : Union [int , float ] = Field (default = 2 , ge = 0 )
59+ stream : Union [int , float , None ] = Field (
60+ default = None , ge = 0 , description = "Timeout for streaming operations."
61+ )
5962
6063
6164class Proxies (BaseModel ):
Original file line number Diff line number Diff line change @@ -1012,7 +1012,9 @@ def grpc_batch_stream(
10121012 try :
10131013 assert self .grpc_stub is not None
10141014 for msg in self .grpc_stub .BatchStream (
1015- request_iterator = requests , metadata = self .grpc_headers ()
1015+ request_iterator = requests ,
1016+ timeout = self .timeout_config .stream ,
1017+ metadata = self .grpc_headers (),
10161018 ):
10171019 yield msg
10181020 except RpcError as e :
@@ -1232,7 +1234,7 @@ def grpc_batch_stream(
12321234 response_deserializer = batch_pb2 .BatchStreamReply .FromString ,
12331235 )(
12341236 request_iterator = None ,
1235- timeout = self .timeout_config .insert ,
1237+ timeout = self .timeout_config .stream ,
12361238 metadata = self .grpc_headers (),
12371239 )
12381240
You can’t perform that action at this time.
0 commit comments