Created
April 8, 2011 20:53
-
-
Save mdolian/910721 to your computer and use it in GitHub Desktop.
Capistrano recipes for Resque
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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