1
0
mirror of https://github.com/fluencelabs/redis synced 2025-03-18 00:20:50 +00:00

redis-trib: added cluster state to node info string

This commit is contained in:
antirez 2011-09-29 15:04:23 +02:00
parent 92dd76c8ee
commit d7021b081b

@ -99,6 +99,7 @@ class ClusterNode
@r.cluster("info").split("\n").each{|e| @r.cluster("info").split("\n").each{|e|
k,v=e.split(":") k,v=e.split(":")
k = k.to_sym k = k.to_sym
v.chop!
if k != :cluster_state if k != :cluster_state
@info[k] = v.to_i @info[k] = v.to_i
else else
@ -163,7 +164,7 @@ class ClusterNode
x.count == 1 ? x.first.to_s : "#{x.first}-#{x.last}" x.count == 1 ? x.first.to_s : "#{x.first}-#{x.last}"
}.join(",") }.join(",")
"#{self.to_s.ljust(25)} slots:#{slots}" "[#{@info[:cluster_state].upcase}] #{self.to_s.ljust(25)} slots:#{slots}"
end end
def info def info