Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

the unit of socket_timeout and socket_connect_timeout? #429

Answered by Grokzen
zhaoyi2 asked this question in Q&A
Discussion options

You must be logged in to vote

@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 the kwargs parameter https://github.com/Grokzen/redis-py-cluster/blob/master/rediscluster/client.py#L305

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 i…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zhaoyi2
Comment options

Answer selected by Grokzen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants