Skip to content

@smostovoy /enqueue.rb
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
script for direct puting job into queue(sidekiq) w/o loading rails
#!/usr/bin/env ruby
begin
require 'sidekiq'
require 'honeybadger'
require File.expand_path(File.dirname(__FILE__)+"/../app/workers/base_worker")
Dir[File.dirname(__FILE__)+"/../app/workers/**/**"].each {|file| require File.expand_path(File.dirname(__FILE__)+file) }
worker = ARGV[0]
arg = ARGV[1]
if arg
p Object.const_get(worker).perform_async(arg)
else
p Object.const_get(worker).perform_async()
end
rescue =>e
Honeybadger.configure do |config|
config.api_key = 'some key'
config.environment_name = ENV["RAILS_ENV"]
config.ignore_only = []
end
Honeybadger.notify_or_ignore(e, {
:component => 'queue.rb',
:parameters => {args: ARGV}
})
p e.message
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.