Skip to content

Instantly share code, notes, and snippets.

@apeckham
Forked from lmarburger/cloud_app_worker.rb
Created June 12, 2012 02:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apeckham/2913947 to your computer and use it in GitHub Desktop.
Save apeckham/2913947 to your computer and use it in GitHub Desktop.
require 'queue_classic'
module CloudApp
Queue = QC::Queue
FailedQueue = QC::Queue.new 'queue_classic_failed_jobs'
class Worker < QC::Worker
def handle_failure(job, exception)
FailedQueue.enqueue job
Airbrake.notify exception, parameters: job.details
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment