Skip to content

Instantly share code, notes, and snippets.

@seivan
Created December 29, 2010 03:41
Show Gist options
  • Save seivan/758132 to your computer and use it in GitHub Desktop.
Save seivan/758132 to your computer and use it in GitHub Desktop.
Bluepill.application("THEAPP") do | app |
["mail"].each do |worker_type|
app.process(worker_type+"_worker") do |process|
process.group = "workers"
#Refactor this into using rails_env and rails_root variables
process.start_command = "cd /home/........production; QUEUE="+worker_type+" rake environment resque:work RAILS_ENV=production"
process.daemonize = true
process.pid_file = "/tmp/"+worker_type+"_worker.pid"
process.start_grace_time = 3.seconds
process.stop_grace_time = 5.seconds
process.restart_grace_time = 8.seconds
process.stop_command = "resque killall"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment