-
-
Save jschoolcraft/908157 to your computer and use it in GitHub Desktop.
bluepill monitoring multiple delayed_job workers
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
app_home = "/home/mi/production" | |
workers = 5 | |
Bluepill.application("mi_delayed_job", :log_file => "#{app_home}/shared/log/bluepill.log") do |app| | |
(0...workers).each do |i| | |
app.process("delayed_job.#{i}") do |process| | |
process.working_dir = "#{app_home}/current" | |
process.start_grace_time = 10.seconds | |
process.stop_grace_time = 10.seconds | |
process.restart_grace_time = 10.seconds | |
process.start_command = "cd #{app_home}/current && RAILS_ENV=production ruby script/delayed_job start -i #{i}" | |
process.stop_command = "cd #{app_home}/current && RAILS_ENV=production ruby script/delayed_job stop -i #{i}" | |
process.pid_file = "#{app_home}/shared/pids/delayed_job.#{i}.pid" | |
process.uid = "mi" | |
process.gid = "mi" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment