lib/rocket_job/cli.rb in rocketjob-3.2.0 vs lib/rocket_job/cli.rb in rocketjob-3.2.1
- old
+ new
@@ -1,8 +1,9 @@
require 'optparse'
require 'semantic_logger'
require 'mongoid'
+require 'rocketjob'
module RocketJob
# Command Line Interface parser for RocketJob
class CLI
include SemanticLogger::Loggable
attr_accessor :name, :workers, :environment, :pidfile, :directory, :quiet,
@@ -151,10 +152,10 @@
@name = arg
end
o.on('-w', '--workers COUNT', 'Number of workers (threads) to start') do |arg|
@workers = arg.to_i
end
- o.on('-t', '--threads COUNT', 'Deprecated') do |arg|
+ o.on('-t', '--threads COUNT', 'DEPRECATED') do |arg|
warn '-t and --threads are deprecated, use -w or --workers'
@workers = arg.to_i
end
o.on('-F', '--filter REGEXP', 'Limit this worker to only those job classes that match this regular expression (case-insensitive)') do |arg|
@filter = Regexp.new(arg, true)