Skip to content

Instantly share code, notes, and snippets.

@benzittlau
Created September 20, 2011 22:15
Show Gist options
  • Save benzittlau/1230582 to your computer and use it in GitHub Desktop.
Save benzittlau/1230582 to your computer and use it in GitHub Desktop.
Various Delayed Job snippets
# List delayed jobs
ruby-1.9.2-p180 :002 > Delayed::Job.all.to_a
# Generate delayed job mongoid indexes
rails runner 'Delayed::Backend::Mongoid::Job.create_indexes'
# Work off the delayed job queue
Delayed::Worker.new.work_off
# Disabled delayed jobs during test
Delayed::Worker.delay_jobs = !Rails.env.test?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment