#!/usr/bin/env ruby begin require 'sidekiq/cli' rescue LoadError # Better way to do this in dev? dir = File.expand_path(File.dirname(__FILE__) + '/../lib') $LOAD_PATH << dir if File.exist?("#{dir}/sidekiq.rb") require 'sidekiq/cli' end begin cli = Sidekiq::CLI.instance cli.parse cli.run rescue => e raise e if $DEBUG STDERR.puts e.message STDERR.puts e.backtrace.join("\n") exit 1 end