File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 1
1
check process resque_worker_QUEUE
2
2
with pidfile /data/APP_NAME/current/tmp/pids/resque_worker_QUEUE.pid
3
- start program = "/bin/sh -l -c 'cd /data/APP_NAME/current; nohup bundle exec rake environment resque:work RAILS_ENV=production QUEUE=queue_name VERBOSE=1 PIDFILE=tmp/pids/resque_worker_QUEUE.pid & >> log/resque_worker_QUEUE.log 2>&1'" as uid deploy and gid deploy
4
- stop program = "/bin/sh -c 'cd /data/APP_NAME/current && kill -s QUIT ` cat tmp/pids/resque_worker_QUEUE.pid` && rm -f tmp/pids/resque_worker_QUEUE.pid; exit 0;'"
3
+ start program = "/usr/bin/env HOME=/home/user RACK_ENV=production PATH=/usr/local/bin:/usr/local/ruby/bin:/usr/bin:/bin:$PATH / bin/sh -l -c 'cd /data/APP_NAME/current; nohup bundle exec rake environment resque:work RAILS_ENV=production QUEUE=queue_name VERBOSE=1 PIDFILE=tmp/pids/resque_worker_QUEUE.pid & >> log/resque_worker_QUEUE.log 2>&1'" as uid deploy and gid deploy
4
+ stop program = "/bin/sh -c 'cd /data/APP_NAME/current && kill -9 %( cat tmp/pids/resque_worker_QUEUE.pid) && rm -f tmp/pids/resque_worker_QUEUE.pid; exit 0;'"
5
5
if totalmem is greater than 300 MB for 10 cycles then restart # eating up memory?
6
- group resque_workers
6
+ group resque_workers
Original file line number Diff line number Diff line change @@ -119,13 +119,14 @@ def poll
119
119
end
120
120
121
121
def show ( page , layout = true )
122
+ response [ "Cache-Control" ] = "max-age=0, private, must-revalidate"
122
123
begin
123
124
erb page . to_sym , { :layout => layout } , :resque => Resque
124
125
rescue Errno ::ECONNREFUSED
125
126
erb :error , { :layout => false } , :error => "Can't connect to Redis! (#{ Resque . redis_id } )"
126
127
end
127
128
end
128
-
129
+
129
130
def show_for_polling ( page )
130
131
content_type "text/html"
131
132
@polling = true
@@ -136,12 +137,12 @@ def show_for_polling(page)
136
137
get "/?" do
137
138
redirect url_path ( :overview )
138
139
end
139
-
140
+
140
141
%w( overview workers ) . each do |page |
141
142
get "/#{ page } .poll" do
142
143
show_for_polling ( page )
143
144
end
144
-
145
+
145
146
get "/#{ page } /:id.poll" do
146
147
show_for_polling ( page )
147
148
end
You can’t perform that action at this time.
0 commit comments