Cluster: use an hardcoded 60 sec timeout in redis-trib connections.

Later this should be configurable from the command line but at least now
we use something more appropriate for our use case compared to the
redis-rb default timeout.
This commit is contained in:
antirez 2013-12-17 10:00:33 +01:00
parent 47815d38e0
commit 7c1cbdceb2

View File

@ -87,7 +87,7 @@ class ClusterNode
print "Connecting to node #{self}: "
STDOUT.flush
begin
@r = Redis.new(:host => @info[:host], :port => @info[:port])
@r = Redis.new(:host => @info[:host], :port => @info[:port], :timeout => 60)
@r.ping
rescue
xputs "[ERR] Sorry, can't connect to node #{self}"