Skip to content

Instantly share code, notes, and snippets.

@mauricioszabo
Forked from tsmango/deploy.rb
Created November 22, 2011 19:36
Show Gist options
  • Save mauricioszabo/1386675 to your computer and use it in GitHub Desktop.
Save mauricioszabo/1386675 to your computer and use it in GitHub Desktop.
...
# Restart Passenger
deploy.task :restart, :roles => :app do
...
# Restart the resque workers
run "cd #{current_path} && rake queue:restart_workers RAILS_ENV=production"
end
namespace :queue do
task :restart_workers => :environment do
Resque.workers.each do |worker|
system "kill -QUIT #{worker.pid}"
end
system("rm /var/run/god/resque-1.8.0*.pid")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment