Skip to content

Instantly share code, notes, and snippets.

@kmile
Created August 4, 2011 14:45
Show Gist options
  • Save kmile/1125318 to your computer and use it in GitHub Desktop.
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.
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