INNER CODE UNIT · Ruby
server_ids
reidmorrison/rocketjob · lib/rocket_job/cli.rb:228
server_ids = RocketJob::Server.where(name: /#{hostname}/).collect(&:id)
raise(ArgumentError, "No server with partial name: #{server_name} was found.") if server_ids.empty?
server_ids
end
# Parse command line options placing results in the corresponding instance variables
def parse(argv)
parser = OptionParser.new do |o|
o.on("-n", "--name NAME", "Unique Name of this server (Default: host_name:PID)") do |arg|
Config.name = arg
end
o.on("-w", "--workers COUNT", "Number of workers (threads) to start") do |arg|
@max_workers = arg.to_i
end
o.on("--include REGEXP",
'Limit this server to only those job classes that match this regular expression (case-insensitive). Example: "DirmonJob|WeeklyReportJob"') do |arg|
@include_filter = Regexp.new(arg, true)