Permalink
Browse files

Merge pull request #23 from twitter/ds-160

DS-160 - Accept multiple host and table args
  • Loading branch information...
2 parents 7681e01 + badcbf4 commit 3f2add8fcbcaf0630031cf2930bcd7ac180c5dc9 @stuhood stuhood committed Mar 3, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/gizzmo.rb
View
@@ -499,7 +499,8 @@ def add_template_opts(subcommand_options, opts)
opts.separator ""
opts.separator "Global options:"
opts.on("-H", "--hosts=HOST[,HOST,...]", "Comma-delimited list of application servers") do |hosts|
- global_options.hosts = hosts.split(",").map {|h| h.strip }
+ global_options.hosts ||= []
+ global_options.hosts += hosts.split(",").map {|h| h.strip }
end
opts.on("-P", "--port=PORT", "PORT of remote manager service (default 7920)") do |port|
@@ -511,7 +512,8 @@ def add_template_opts(subcommand_options, opts)
end
opts.on("-T", "--tables=TABLE[,TABLE,...]", "TABLE ids of forwardings to affect") do |tables|
- global_options.tables = tables.split(",").map {|t| t.to_i }
+ global_options.tables ||= []
+ global_options.tables += tables.split(",").map {|t| t.to_i }
end
opts.on("-F", "--framed", "Use the thrift framed transport") do |framed|

0 comments on commit 3f2add8

Please sign in to comment.