Commit 16f65068 authored by yyoshiki41's avatar yyoshiki41
Browse files

Refactor redis-trib.rb

parent a5998d1f
...@@ -1445,7 +1445,7 @@ class RedisTrib ...@@ -1445,7 +1445,7 @@ class RedisTrib
xputs ">>> Importing data from #{source_addr} to cluster #{argv[1]}" xputs ">>> Importing data from #{source_addr} to cluster #{argv[1]}"
use_copy = opt['copy'] use_copy = opt['copy']
use_replace = opt['replace'] use_replace = opt['replace']
# Check the existing cluster. # Check the existing cluster.
load_cluster_info_from_node(argv[0]) load_cluster_info_from_node(argv[0])
check_cluster check_cluster
...@@ -1669,7 +1669,6 @@ ALLOWED_OPTIONS={ ...@@ -1669,7 +1669,6 @@ ALLOWED_OPTIONS={
def show_help def show_help
puts "Usage: redis-trib <command> <options> <arguments ...>\n\n" puts "Usage: redis-trib <command> <options> <arguments ...>\n\n"
COMMANDS.each{|k,v| COMMANDS.each{|k,v|
o = ""
puts " #{k.ljust(15)} #{v[2]}" puts " #{k.ljust(15)} #{v[2]}"
if ALLOWED_OPTIONS[k] if ALLOWED_OPTIONS[k]
ALLOWED_OPTIONS[k].each{|optname,has_arg| ALLOWED_OPTIONS[k].each{|optname,has_arg|
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment