class Sidekiq::CLI
def option_parser(opts)
def option_parser(opts) parser = OptionParser.new { |o| o.on "-c", "--concurrency INT", "processor threads to use" do |arg| opts[:concurrency] = Integer(arg) end o.on "-d", "--daemon", "Daemonize process" do |arg| puts "ERROR: Daemonization mode was removed in Sidekiq 6.0, please use a proper process supervisor to start and manage your services" end o.on "-e", "--environment ENV", "Application environment" do |arg| opts[:environment] = arg end o.on "-g", "--tag TAG", "Process tag for procline" do |arg| opts[:tag] = arg end o.on "-q", "--queue QUEUE[,WEIGHT]", "Queues to process with optional weights" do |arg| queue, weight = arg.split(",") parse_queue opts, queue, weight 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 "-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| opts[:config_file] = arg end o.on "-L", "--logfile PATH", "path to writable logfile" do |arg| puts "ERROR: Logfile redirection was removed in Sidekiq 6.0, Sidekiq will only log to STDOUT" end o.on "-P", "--pidfile PATH", "path to pidfile" do |arg| puts "ERROR: PID file creation was removed in Sidekiq 6.0, please use a proper process supervisor to start and manage your services" end o.on "-V", "--version", "Print version and exit" do |arg| puts "Sidekiq #{Sidekiq::VERSION}" die(0) end } parser.banner = "sidekiq [options]" parser.on_tail "-h", "--help", "Show help" do logger.info parser die 1 end parser end