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.