lib/rabbit_wq/cli.rb in rabbit-wq-0.5.0 vs lib/rabbit_wq/cli.rb in rabbit-wq-1.0.0

- old
+ new

@@ -1,6 +1,6 @@ - require 'rubygems' +require 'rubygems' require 'rabbit_wq' require 'trollop' require 'yell' module RabbitWQ @@ -18,12 +18,10 @@ DEFAULT_CONFIG_PATH = "/etc/#{APP_ID}/#{APP_ID}.conf" DEFAULT_LOG_PATH = "/var/log/#{APP_ID}/#{APP_ID}.log" DEFAULT_PID_PATH = "/var/run/#{APP_ID}/#{APP_ID}.pid" - DEFAULT_NUMBER_OF_THREADS = 1 - def initialize( args ) Trollop::options do version VERSION_COPYRIGHT banner <<-EOS #{APP_NAME} #{VERSION_COPYRIGHT} @@ -49,19 +47,19 @@ Trollop::options do opt :config, "The path for the config file", :type => String, :short => '-c', :default => DEFAULT_CONFIG_PATH opt :log_level, "The log level", :type => String, :default => 'info' opt :log, "The path for the log file", :type => String, :short => '-l', :default => DEFAULT_LOG_PATH opt :pid, "The path for the PID file", :type => String, :default => DEFAULT_PID_PATH - opt :threads, "The number of threads", :type => Integer, :default => DEFAULT_NUMBER_OF_THREADS, :short => '-t' + opt :threads, "The number of threads", :type => Integer, :short => '-t' end when "start" Trollop::options do opt :config, "The path for the config file", :type => String, :short => '-c', :default => DEFAULT_CONFIG_PATH opt :interactive, "Execute the server in interactive mode", :short => '-i' opt :log_level, "The log level", :type => String, :default => 'info' opt :log, "The path for the log file", :type => String, :short => '-l', :default => DEFAULT_LOG_PATH opt :pid, "The path for the PID file", :type => String, :default => DEFAULT_PID_PATH - opt :threads, "The number of threads", :type => Integer, :default => DEFAULT_NUMBER_OF_THREADS, :short => '-t' + opt :threads, "The number of threads", :type => Integer, :short => '-t' end when "status" Trollop::options do opt :pid, "The path for the PID file", :type => String, :default => DEFAULT_PID_PATH end