Sha256: ac15f80e6be735d1d32b5ac094bfa86b53f792d153907eb29c1cb42276223b42

Contents?: true

Size: 742 Bytes

Versions: 42

Compression:

Stored size: 742 Bytes

Contents

<%
  @path = '/etc/monit/monit.d/monit-resque_worker.conf'
%>

<% rubber_env.resque_workers.each_with_index do |worker, i| %>
  <%
    PIDFILE = "#{RUBBER_ROOT}/tmp/pids/resque_worker_#{i}.pid"

    start_program = "cd #{RUBBER_ROOT} && ./script/resque_worker_management.rb start #{i}"
    stop_program  = "cd #{RUBBER_ROOT} && ./script/resque_worker_management.rb stop #{i}"
  %>

  check process resque_worker_<%= i %> with pidfile <%= PIDFILE %>
    group resque_worker
    start program = "/usr/bin/sudo -H -u <%= rubber_env.app_user %> bash -l -c '<%= start_program %>'"
    stop program = "/usr/bin/sudo -H -u <%= rubber_env.app_user %> bash -l -c '<%= stop_program %>'"

    if totalmem > 350.0 MB for 15 cycles then restart
<% end %>

Version data entries

42 entries across 21 versions & 4 rubygems

Version Path
axtro-rubber-1.5.7 generators/vulcanize/templates/resque/config/rubber/role/resque_worker/monit-resque_worker.conf
axtro-rubber-1.5.7 lib/generators/vulcanize/templates/resque/config/rubber/role/resque_worker/monit-resque_worker.conf
rubber-1.5.7 lib/generators/vulcanize/templates/resque/config/rubber/role/resque_worker/monit-resque_worker.conf
rubber-1.5.7 generators/vulcanize/templates/resque/config/rubber/role/resque_worker/monit-resque_worker.conf
rubber-1.5.6 lib/generators/vulcanize/templates/resque/config/rubber/role/resque_worker/monit-resque_worker.conf
rubber-1.5.6 generators/vulcanize/templates/resque/config/rubber/role/resque_worker/monit-resque_worker.conf
sml-rubber-1.5.5 lib/generators/vulcanize/templates/resque/config/rubber/role/resque_worker/monit-resque_worker.conf
sml-rubber-1.5.5 generators/vulcanize/templates/resque/config/rubber/role/resque_worker/monit-resque_worker.conf
rubber-1.5.5 generators/vulcanize/templates/resque/config/rubber/role/resque_worker/monit-resque_worker.conf
rubber-1.5.5 lib/generators/vulcanize/templates/resque/config/rubber/role/resque_worker/monit-resque_worker.conf
rubber-1.5.4 lib/generators/vulcanize/templates/resque/config/rubber/role/resque_worker/monit-resque_worker.conf
rubber-1.5.4 generators/vulcanize/templates/resque/config/rubber/role/resque_worker/monit-resque_worker.conf
rubber-1.5.3 lib/generators/vulcanize/templates/resque/config/rubber/role/resque_worker/monit-resque_worker.conf
rubber-1.5.3 generators/vulcanize/templates/resque/config/rubber/role/resque_worker/monit-resque_worker.conf
rubber-1.5.2 lib/generators/vulcanize/templates/resque/config/rubber/role/resque_worker/monit-resque_worker.conf
rubber-1.5.2 generators/vulcanize/templates/resque/config/rubber/role/resque_worker/monit-resque_worker.conf
rubber-1.5.1 generators/vulcanize/templates/resque/config/rubber/role/resque_worker/monit-resque_worker.conf
rubber-1.5.1 lib/generators/vulcanize/templates/resque/config/rubber/role/resque_worker/monit-resque_worker.conf
rubber-1.5.0 lib/generators/vulcanize/templates/resque/config/rubber/role/resque_worker/monit-resque_worker.conf
rubber-1.5.0 generators/vulcanize/templates/resque/config/rubber/role/resque_worker/monit-resque_worker.conf