]> git.saurik.com Git - redis.git/commitdiff
redis-trib: minor refactoring creating a method to load the cluster information start...
authorantirez <antirez@gmail.com>
Thu, 29 Sep 2011 13:45:10 +0000 (15:45 +0200)
committerantirez <antirez@gmail.com>
Thu, 29 Sep 2011 13:45:10 +0000 (15:45 +0200)
src/redis-trib.rb

index 969cbfc33dce55000616d12347b521eeb93db611..ac490d28212c696d2fede36f82ae4a4e143851d9 100755 (executable)
@@ -258,9 +258,7 @@ class RedisTrib
         end
     end
 
-    # redis-trib subcommands implementations
-
-    def check_cluster_cmd
+    def load_cluster_info_from_node(nodeaddr)
         node = ClusterNode.new(ARGV[1])
         node.connect(:abort => true)
         node.assert_cluster
@@ -272,6 +270,12 @@ class RedisTrib
             fnode.load_info()
             add_node(fnode)
         }
+    end
+
+    # redis-trib subcommands implementations
+
+    def check_cluster_cmd   
+        load_cluster_info_from_node(ARGV[1])
         check_cluster
     end