exe/cloudtasker in cloudtasker-0.7.0 vs exe/cloudtasker in cloudtasker-0.8.0

- old
+ new

@@ -1,12 +1,24 @@ #!/usr/bin/env ruby # frozen_string_literal: true require 'bundler/setup' require 'cloudtasker/cli' +require 'optparse' +options = {} +OptionParser.new do |opts| + opts.banner = 'Usage: cloudtasker [options]' + + opts.on('-q QUEUE', '--queue=QUEUE', 'Queue to process and number of threads. ' \ + "Examples: '-q critical' | '-q critical,2' | '-q critical,3 -q defaults,2'") do |o| + options[:queues] ||= [] + options[:queues] << o.split(',') + end +end.parse! + begin - Cloudtasker::CLI.run + Cloudtasker::CLI.run(options) rescue StandardError => e raise e if $DEBUG warn e.message warn e.backtrace.join("\n")