Skip to content

Commit 923fda3

Browse files
committed
Merge pull request resque#714 from postmodern/examples
Normalized Examples
2 parents 6b5ea62 + 0f3d1fd commit 923fda3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

examples/god/resque.god

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
rails_env = ENV['RAILS_ENV'] || "production"
2-
rails_root = ENV['RAILS_ROOT'] || "/data/github/current"
2+
rails_root = ENV['RAILS_ROOT'] || "/srv/APP_NAME/current"
33
num_workers = rails_env == 'production' ? 5 : 2
44

55
num_workers.times do |num|
@@ -11,8 +11,8 @@ num_workers.times do |num|
1111
w.env = {"QUEUE"=>"critical,high,low", "RAILS_ENV"=>rails_env}
1212
w.start = "/usr/bin/rake -f #{rails_root}/Rakefile environment resque:work"
1313

14-
w.uid = 'git'
15-
w.gid = 'git'
14+
w.uid = 'deploy'
15+
w.gid = 'deploy'
1616

1717
# restart if memory gets too high
1818
w.transition(:up, :restart) do |on|

examples/monit/resque.monit

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
check process resque_worker_QUEUE
2-
with pidfile /data/APP_NAME/current/tmp/pids/resque_worker_QUEUE.pid
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;'"
2+
with pidfile /srv/APP_NAME/current/tmp/pids/resque_worker_QUEUE.pid
3+
start program = "/usr/bin/env HOME=/home/user PATH=/usr/local/bin:/usr/local/ruby/bin:/usr/bin:/bin:$PATH /bin/sh -l -c 'cd /srv/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 /srv/APP_NAME/current && kill -9 $(cat tmp/pids/resque_worker_QUEUE.pid) && rm -f tmp/pids/resque_worker_QUEUE.pid; exit 0;'"
55
if totalmem is greater than 300 MB for 10 cycles then restart # eating up memory?
66
group resque_workers

0 commit comments

Comments
 (0)