mirror of
https://github.com/fluencelabs/redis
synced 2025-03-17 16:10:50 +00:00
redis-trib: minor refactoring creating a method to load the cluster information starting from a single node
This commit is contained in:
parent
5d8f25da36
commit
9514aa3251
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user