Skip to content

Commit

Permalink
Starting delayed_job as unicorn_user
Browse files Browse the repository at this point in the history
Monit tried to start delayed_job as admin user.
  • Loading branch information
mkllnk committed Dec 3, 2015
1 parent 2b07595 commit 1355820
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions roles/common/templates/monit.j2
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
check process openfoodnetwork_dj_worker_0
with pidfile {{ current_path }}/tmp/pids/delayed_job.0.pid
start program = "/bin/bash -c 'RAILS_ENV={{ rails_env }} {{ unicorn_home_path }}/.rbenv/shims/ruby {{ current_path }}/script/delayed_job -i 0 start'"
as uid {{ user }} and gid {{ user }}
as uid {{ unicorn_user }} and gid {{ unicorn_user }}
with timeout 120 seconds
stop program = "/bin/bash -c 'RAILS_ENV={{ rails_env }} {{ unicorn_home_path }}/.rbenv/shims/ruby {{ current_path }}/script/delayed_job -i 0 stop'"
as uid {{ user }} and gid {{ user }}
as uid {{ unicorn_user }} and gid {{ unicorn_user }}
with timeout 120 seconds
if mem is greater than 250.0 MB for 3 cycles then restart

0 comments on commit 1355820

Please sign in to comment.