mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
21 lines
408 B
Ruby
Executable file
21 lines
408 B
Ruby
Executable file
#!/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.new
|
|
cli.parse
|
|
cli.run
|
|
rescue => e
|
|
raise e if $DEBUG
|
|
STDERR.puts e.message
|
|
STDERR.puts e.backtrace.join("\n")
|
|
exit 1
|
|
end
|