0
opts.on("-S", "--socket PATH", "bind to unix domain socket") { |file| options[:socket] = file }
0
opts.on("-e", "--environment ENV", "Rails environment (default: development)") { |env| options[:environment] = env }
0
opts.on("-c", "--chdir PATH", "Change to dir before starting") { |dir| options[:chdir] = File.expand_path(dir) }
0
- opts.on("-s", "--servers NUM", "Number of servers to start",
0
- "set a value >1 to start a cluster") { |num| options[:servers] = num.to_i }
0
+ opts.on("-t", "--timeout SEC", "Request or command timeout in sec",
0
+ "(default: #{options[:timeout]})") { |sec| options[:timeout] = sec.to_i }
0
+ opts.on( "--prefix PATH", "Mount the app under PATH (start with /)") { |path| options[:prefix] = path }
0
+ opts.on( "--stats PATH", "Mount the Stats adapter under PATH") { |path| options[:stats] = path }
0
+ opts.separator "Daemon options:"
0
opts.on("-d", "--daemonize", "Run daemonized in the background") { options[:daemonize] = true }
0
opts.on("-l", "--log FILE", "File to redirect output",
0
"(default: #{options[:log]})") { |file| options[:log] = file }
0
opts.on("-P", "--pid FILE", "File to store PID",
0
"(default: #{options[:pid]})") { |file| options[:pid] = file }
0
- opts.on("-t", "--timeout SEC", "Request or command timeout in sec",
0
- "(default: #{options[:timeout]})") { |sec| options[:timeout] = sec.to_i }
0
opts.on("-u", "--user NAME", "User to run daemon as (use with -g)") { |user| options[:user] = user }
0
opts.on("-g", "--group NAME", "Group to run daemon as (use with -u)") { |group| options[:group] = group }
0
- opts.on( "--prefix PATH", "Mount the app under PATH (start with /)") { |path| options[:prefix] = path }
0
- opts.on("-C", "--config PATH", "Load option from a config file") { |file| options[:config] = file }
0
- opts.on( "--stats PATH", "Mount the Stats adapter under PATH") { |path| options[:stats] = path }
0
+ opts.separator "Cluster options:"
0
+ opts.on("-s", "--servers NUM", "Number of servers to start",
0
+ "set a value >1 to start a cluster") { |num| options[:servers] = num.to_i }
0
+ opts.on("-o", "--only", "Send command to only one server of the cluster") { |only| options[:only] = only }
0
+ opts.on("-C", "--config PATH", "Load options from a config file") { |file| options[:config] = file }
0
opts.separator "Common options:"
0
opts.on_tail("-D", "--debug", "Set debbuging on") { $DEBUG = true }
0
- options[:
servers] && options[:servers] > 10
+ options[:
only] || (options[:servers] && options[:servers] > 1)0
def load_options_from_config_file!(options)
Comments
No one has commented yet.