redis-trib: ClusterNode #info_string output modified.
The hope is that the new one is more readable.
This commit is contained in:
parent
50ebef7662
commit
1a83a42ead
@ -217,7 +217,10 @@ 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(",")
|
||||||
|
|
||||||
"[#{@info[:cluster_state].upcase} #{(self.info[:flags]-["myself"]).join(",")}] #{self.info[:name]} #{self.to_s} slots:#{slots} (#{self.slots.length} slots)"
|
role = self.has_flag?("master") ? "M" : "S"
|
||||||
|
"#{role}: #{self.info[:name]} #{self.to_s}\n"+
|
||||||
|
" slots:#{slots} (#{self.slots.length} slots) "+
|
||||||
|
"#{(self.info[:flags]-["myself"]).join(",")}"
|
||||||
end
|
end
|
||||||
|
|
||||||
# Return a single string representing nodes and associated slots.
|
# Return a single string representing nodes and associated slots.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user