Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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}"
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"
after "deploy:symlink_configs", "resque:symlink"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment