Sha256: a99afc307f5800a563e9f289f21d669451ee4dca4a0ad0bb6eb46a3bfce874eb
Contents?: true
Size: 975 Bytes
Versions: 1
Compression:
Stored size: 975 Bytes
Contents
#!/usr/bin/env ruby # frozen_string_literal: true require_relative '../lib/quiq' require 'optparse' options = { path: Dir.pwd, queues: %w[default], log_level: Logger::DEBUG } OptionParser.new do |opts| opts.banner = 'Usage: quiq [options]' opts.on('-p', '--path PATH', 'Location of the workers to load') do |path| options[:path] = File.expand_path(path) end opts.on('-q', '--queues NAMES', Array, 'Comma-separated list of queues to poll') do |queues| options[:queues] = queues end opts.on('-l', '--log-level LEVEL', %i[debug info warn error], 'The logging level') do |level| options[:log_level] = level end opts.on '-v', '--version', 'Output version and exit' do puts "Quiq #{Quiq::VERSION}" exit end opts.on_tail('-h', '--help', 'Show this message') do puts opts exit end end.parse! begin Quiq.boot(options) rescue StandardError => e warn e.message warn e.backtrace.join("\n") exit 1 end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
quiq-0.2.0 | bin/quiq |