-
who knows the unit of socket_timeout and socket_connect_timeout in RedisCluster, seconds or milliseconds? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@zhaoyi2 Thanks for being the first person to use the Discussions page for this.
It then moves into the connection pool here https://github.com/andymccurdy/redis-py/blob/1a41cfd95a53a95b078084d8627be6b6fba3bb71/redis/client.py#L739 And the value will finally end up here https://github.com/andymccurdy/redis-py/blob/e635130043d7657d9bee6911995f649e2de9eb04/redis/connection.py#L596 inside redis-py and be a value that is set on the regular python socket object. Looking into the documentation for sockets inside python you find this here for python 3.9 (Change version to match your version you use) https://docs.python.org/3/library/socket.html#socket.socket.settimeout
Sot he answer to your question is |
Beta Was this translation helpful? Give feedback.
@zhaoyi2 Thanks for being the first person to use the Discussions page for this.
socket_timeout
is an option that is simply passed along upstream to redis-py here via thekwargs
parameter https://github.com/Grokzen/redis-py-cluster/blob/master/rediscluster/client.py#L305It then moves into the connection pool here https://github.com/andymccurdy/redis-py/blob/1a41cfd95a53a95b078084d8627be6b6fba3bb71/redis/client.py#L739
And the value will finally end up here https://github.com/andymccurdy/redis-py/blob/e635130043d7657d9bee6911995f649e2de9eb04/redis/connection.py#L596 inside redis-py and be a value that is set on the regular python socket object.
Looking into the documentation for sockets i…