resque.rake revision a543dfe944ecddb71e09c6c156afb3e471c78d6e
require 'resque/tasks'
namespace :resque do
task :setup => :environment do
ENV['QUEUE'] = '*'
end
task :restart => :environment do
pids = Array.new
Resque.workers.each do |worker|
pids << worker.to_s.split(/:/).second
end
if pids.size > 0
system "kill -QUIT #{pids.join(' ')}"
end
system 'rm /var/run/god/resque*.pid'
end
end