Skip to content

Instantly share code, notes, and snippets.

@cantin
Created August 17, 2012 02:22
Show Gist options
  • Save cantin/3375389 to your computer and use it in GitHub Desktop.
Save cantin/3375389 to your computer and use it in GitHub Desktop.
delayed_job_mongoid cap/deploy
namespace :delayed_job do
task :setup do
puts capture %Q(cd #{deploy_to}/current/ && RAILS_ENV=production script/rails runner 'Delayed::Backend::Mongoid::Job.create_indexes')
end
task :start do
puts capture %Q(cd #{deploy_to}/current/ && RAILS_ENV=production script/delayed_job start)
end
task :stop do
puts capture %Q(cd #{deploy_to}/current/ && RAILS_ENV=production script/delayed_job stop)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment