I think this is exactly what Service Configs are supposed to solve, but I 
haven't investigate them at 
all: https://github.com/grpc/grpc/blob/master/doc/service_config.md

Hope that helps,

Evan


On Saturday, September 2, 2017 at 4:24:20 AM UTC-4, Amit Saha wrote:
>
> Hi all,
>
> I can set call specific timeout as follows:
>
> response = stub.CreateUser(
>             users_messages.CreateUserRequest(username='tom'),
>             metadata=metadata,
>             timeout=30,
>  )
>
> Is it possible to set timeout when creating the stub (so that i don't have 
> to set the timeout per call)? I could create a wrapper to do this 
> automatically, something like this i guess:
>
> def wrapped_client(stub, method, data, metadata):
>     # not sure if this actually works..more of an idea
>     getattr(stub, method)(data, metadata=metadata,timeout=30)
>
> and then always use this wrapper.
>
>
> Thanks,
> Amit.
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/08140ec6-4814-4267-995c-4360ea12406b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to