mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Alphabetize CLI options
This commit is contained in:
parent
7d922c690b
commit
89f76e076d
1 changed files with 19 additions and 19 deletions
|
@ -229,13 +229,8 @@ module Sidekiq
|
|||
opts = {}
|
||||
|
||||
@parser = OptionParser.new do |o|
|
||||
o.on "-q", "--queue QUEUE[,WEIGHT]...", "Queues to process with optional weights" do |arg|
|
||||
queues_and_weights = arg.scan(/([\w\.-]+),?(\d*)/)
|
||||
parse_queues opts, queues_and_weights
|
||||
end
|
||||
|
||||
o.on "-v", "--verbose", "Print more verbose output" do |arg|
|
||||
opts[:verbose] = arg
|
||||
o.on '-c', '--concurrency INT', "processor threads to use" do |arg|
|
||||
opts[:concurrency] = Integer(arg)
|
||||
end
|
||||
|
||||
o.on '-d', '--daemon', "Daemonize process" do |arg|
|
||||
|
@ -246,18 +241,10 @@ module Sidekiq
|
|||
opts[:environment] = arg
|
||||
end
|
||||
|
||||
o.on '-t', '--timeout NUM', "Shutdown timeout" do |arg|
|
||||
opts[:timeout] = Integer(arg)
|
||||
end
|
||||
|
||||
o.on '-g', '--tag TAG', "Process tag for procline" do |arg|
|
||||
opts[:tag] = arg
|
||||
end
|
||||
|
||||
o.on '-r', '--require [PATH|DIR]', "Location of Rails application with workers or file to require" do |arg|
|
||||
opts[:require] = arg
|
||||
end
|
||||
|
||||
o.on '-i', '--index INT', "unique process index on this machine" do |arg|
|
||||
opts[:index] = Integer(arg)
|
||||
end
|
||||
|
@ -266,12 +253,21 @@ module Sidekiq
|
|||
opts[:profile] = arg
|
||||
end
|
||||
|
||||
o.on '-c', '--concurrency INT', "processor threads to use" do |arg|
|
||||
opts[:concurrency] = Integer(arg)
|
||||
o.on "-q", "--queue QUEUE[,WEIGHT]...", "Queues to process with optional weights" do |arg|
|
||||
queues_and_weights = arg.scan(/([\w\.-]+),?(\d*)/)
|
||||
parse_queues opts, queues_and_weights
|
||||
end
|
||||
|
||||
o.on '-P', '--pidfile PATH', "path to pidfile" do |arg|
|
||||
opts[:pidfile] = arg
|
||||
o.on '-r', '--require [PATH|DIR]', "Location of Rails application with workers or file to require" do |arg|
|
||||
opts[:require] = arg
|
||||
end
|
||||
|
||||
o.on '-t', '--timeout NUM', "Shutdown timeout" do |arg|
|
||||
opts[:timeout] = Integer(arg)
|
||||
end
|
||||
|
||||
o.on "-v", "--verbose", "Print more verbose output" do |arg|
|
||||
opts[:verbose] = arg
|
||||
end
|
||||
|
||||
o.on '-C', '--config PATH', "path to YAML config file" do |arg|
|
||||
|
@ -282,6 +278,10 @@ module Sidekiq
|
|||
opts[:logfile] = arg
|
||||
end
|
||||
|
||||
o.on '-P', '--pidfile PATH', "path to pidfile" do |arg|
|
||||
opts[:pidfile] = arg
|
||||
end
|
||||
|
||||
o.on '-V', '--version', "Print version and exit" do |arg|
|
||||
puts "Sidekiq #{Sidekiq::VERSION}"
|
||||
die(0)
|
||||
|
|
Loading…
Reference in a new issue