]> git.saurik.com Git - redis.git/commitdiff
redis-trib: when loading node info also fetch the output of CLUSTER INFO.
authorantirez <antirez@gmail.com>
Thu, 29 Sep 2011 11:18:09 +0000 (13:18 +0200)
committerantirez <antirez@gmail.com>
Thu, 29 Sep 2011 11:18:09 +0000 (13:18 +0200)
src/redis-trib.rb

index daa5a78a8f54db394a5217f185625424b232434c..7086b4b2707c89654f68493ff8cef0e9e3c6b5e3 100755 (executable)
@@ -96,6 +96,15 @@ class ClusterNode
                     end
                 }
                 @dirty = false
+                @r.cluster("info").split("\n").each{|e|    
+                    k,v=e.split(":")
+                    k = k.to_sym
+                    if k != :cluster_state
+                        @info[k] = v.to_i
+                    else
+                        @info[k] = v
+                    end
+                }
             elsif o[:getfriends]
                 @friends << info
             end