Skip to content

Instantly share code, notes, and snippets.

@razum2um
Created June 17, 2013 14:03
Show Gist options
  • Save razum2um/5797096 to your computer and use it in GitHub Desktop.
Save razum2um/5797096 to your computer and use it in GitHub Desktop.
if Rails.env.development?
Rails.logger.info "Delayed::Job is executed synchronously in #{Rails.env} mode."
Delayed::Job.class_eval do
def self.enqueue(obj)
Rails.logger.info "Delayed::Job:SYNC START"
Rails.logger.info obj.inspect
obj[:payload_object].perform
Rails.logger.info "Delayed::Job:SYNC END"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment