2012-01-16 19:14:47 -05:00
|
|
|
#!/usr/bin/env ruby
|
|
|
|
|
2012-01-24 21:07:18 -05:00
|
|
|
begin
|
|
|
|
require 'sidekiq/cli'
|
|
|
|
rescue LoadError
|
|
|
|
# Better way to do this in dev?
|
2012-01-26 14:50:23 -05:00
|
|
|
dir = File.expand_path(File.dirname(__FILE__) + '/../lib')
|
|
|
|
$LOAD_PATH << dir if File.exist?("#{dir}/sidekiq.rb")
|
2012-01-24 21:07:18 -05:00
|
|
|
require 'sidekiq/cli'
|
|
|
|
end
|
2012-01-16 19:14:47 -05:00
|
|
|
|
|
|
|
begin
|
2012-01-16 19:15:29 -05:00
|
|
|
cli = Sidekiq::CLI.new
|
2012-02-12 23:48:13 -05:00
|
|
|
cli.parse
|
2012-01-16 19:14:47 -05:00
|
|
|
cli.run
|
|
|
|
rescue => e
|
|
|
|
raise e if $DEBUG
|
|
|
|
STDERR.puts e.message
|
2012-02-12 23:48:13 -05:00
|
|
|
STDERR.puts e.backtrace.join("\n")
|
2012-01-16 19:14:47 -05:00
|
|
|
exit 1
|
|
|
|
end
|