You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now from the documentation and code it seems the only way to give a timeout value to a request is during initialization through the option hash. But If I want different timelimits for different kind of queries there doesn't seem to be a way to do that. This is useful in some scenarios where for some query you want the response very fast so you will give it a lower timelimit compared to a query for which you are happy to wait for a longer time.
I looked through the code. The client class has a with_socket_timeout method which can do this. So, a trivial solution would be to add a method in redis class which accepts timeout limit, method name and arguments and uses the with_socket_timeout method to modify the connection timelimit. I will be happy to give a PR if you guys think this would be a good addition.
The text was updated successfully, but these errors were encountered:
Right now from the documentation and code it seems the only way to give a timeout value to a request is during initialization through the option hash. But If I want different timelimits for different kind of queries there doesn't seem to be a way to do that. This is useful in some scenarios where for some query you want the response very fast so you will give it a lower timelimit compared to a query for which you are happy to wait for a longer time.
I looked through the code. The client class has a
with_socket_timeout
method which can do this. So, a trivial solution would be to add a method in redis class which accepts timeout limit, method name and arguments and uses the with_socket_timeout method to modify the connection timelimit. I will be happy to give a PR if you guys think this would be a good addition.The text was updated successfully, but these errors were encountered: