Skip to content

Instantly share code, notes, and snippets.

@mdolian
Created April 8, 2011 20:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mdolian/910721 to your computer and use it in GitHub Desktop.
Save mdolian/910721 to your computer and use it in GitHub Desktop.
Capistrano recipes for Resque
namespace :resque do
desc "After deploy:restart we want to restart the workers"
task :restart, :roles => [:app], :only => {:resque => true} do
sudo "monit restart all -g resque_#{application}"
end
after "deploy:restart","resque:restart"
desc "After update_code we want to symlink the resque.yml"
task :symlink, :roles => [:app], :only => {:resque => true} do
run "if [ -f #{shared_path}/config/resque.yml ]; then ln -nfs #{shared_path}/config/resque.yml #{latest_release}/config/resque.yml; fi"
end
after "deploy:symlink_configs", "resque:symlink"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment