Skip to content

Instantly share code, notes, and snippets.

@ZenCocoon
Created March 11, 2011 20:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ZenCocoon/866561 to your computer and use it in GitHub Desktop.
Save ZenCocoon/866561 to your computer and use it in GitHub Desktop.
Delayed Job chef template
check process <%= @worker_name %>
with pidfile /data/<%= @app_name %>/shared/pids/delayed_job.<%= @worker_count %>.pid
start program = "/bin/bash -c 'cd /data/<%= @app_name %>/current/;RAILS_ENV=<%= @framework_env %> script/delayed_job start -i <%= @worker_count %>'" with uid deploy and gid deploy with timeout 65 seconds
stop program = "/bin/bash -c 'export RAILS_ENV=<%= @framework_env %>;cd /data/<%= @app_name %>/current/;script/delayed_job stop -i <%= @worker_count %>'"
if totalmem is greater than 240 MB for 2 cycles then restart # eating up memory?
group dj_<%= @app_name %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment