Created
August 4, 2011 14:45
-
-
Save kmile/1125318 to your computer and use it in GitHub Desktop.
A sample pill file for delayed job, won't log to stdout however.
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_root = File.join(File.dirname(__FILE__), '../') | |
Bluepill.application('app_name', :log_file => File.join(app_root, 'log', 'bluepill.log')) do |app| | |
app.working_dir = app_root | |
app.process("delayed-job.#{app.app.name}") do |process| | |
process.start_command = '/opt/ruby-enterprise/bin/rake RAILS_ENV=production jobs:work --trace' | |
process.stdout = process.stderr = File.join(app.working_dir, 'log', "#{process.name}.log") | |
process.daemonize = true | |
process.uid = "app_uid" | |
process.gid = "app_gid" | |
process.start_grace_time = 5.seconds | |
process.stop_grace_time = 30.seconds | |
process.restart_grace_time = 30.seconds | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment