scripts/resque/resque_monit.conf in standup-0.3.23 vs scripts/resque/resque_monit.conf in standup-0.3.24
- old
+ new
@@ -1,5 +1,5 @@
-<% ((scripts.webapp.params.respond_to?(:resque_queues) && scripts.webapp.params.resque_queues.presence) || {"ALL_QUEUES" => 1 }).each_pair do |queue_name,num_of_workers|%>
+<% ((scripts.webapp.params.has_key?(:resque_queues) && scripts.webapp.params.resque_queues.presence) || {"ALL_QUEUES" => 1 }).each_pair do |queue_name,num_of_workers|%>
<%1.upto(num_of_workers) do |num|%>
check process resque_<%= queue_name %>_<%= num %>
with pidfile <%= scripts.webapp.app_path%>/tmp/pids/resque_<%= queue_name %>_<%=num %>.pid
start program = "/bin/sh -c 'cd <%= scripts.webapp.app_path%>; RAILS_ENV=<%= scripts.webapp.params.rails_env%> script/resque <%= queue_name %> <%=num %>'"
stop program = "/bin/sh -c 'cd <%= scripts.webapp.app_path%> && kill -s QUIT `cat tmp/pids/resque_<%= queue_name %>_<%=num %>.pid` && rm -f tmp/pids/resque_<%= queue_name %>_<%=num %>.pid; exit 0;'"