fix rescue job won't start

This commit is contained in:
Matt K. Fu 2013-04-25 15:46:16 +08:00
parent a0478f2a8f
commit 12e39b4d77
2 changed files with 8 additions and 8 deletions

View File

@ -10,8 +10,8 @@ num_workers.times do |num|
God.watch do |w|
w.dir = rails_root
w.name = "resque-#{num}"
w.group = 'nccu_production'
w.name = "worker-#{num}"
w.group = 'resque'
w.interval = 30.seconds
@ -25,12 +25,12 @@ num_workers.times do |num|
end
w.env = {"QUEUE"=>queue, "RAILS_ENV"=>rails_env}
w.start = "HOME=#{user_home} rake -f #{rails_root}/Rakefile resque:work QUEUE=* RAILS_ENV=#{rails_env}"
w.start = "HOME=#{user_home} QUEUE=* RAILS_ENV=#{rails_env}" rake -f #{rails_root}/Rakefile resque:work
w.uid = (rails_env == 'production' )? "root" : development_uid
w.gid = (rails_env == 'production' )? "root" : development_gid
w.log = (rails_env == 'production' )? "/var/log/#{w.group}-#{w.name}":"#{rails_root}/log/dev_resque-#{w.name}.log"
w.log = (rails_env == 'production' )? "/var/log/#{w.group}/#{w.name}.log":"#{rails_root}/log/dev_resque-#{w.name}.log"
# restart if memory gets too high
w.transition(:up, :restart) do |on|

View File

@ -6,16 +6,16 @@ development_gid = ''
God.watch do |w|
w.dir = rails_root
w.name = "resque-scheduler"
w.group = 'nccu_production'
w.name = "scheduler"
w.group = 'resque'
w.interval = 30.seconds
w.env = {"QUEUE"=>"critical,high,low", "RAILS_ENV"=>rails_env}
w.start = "HOME= #{user_home} rake -f #{rails_root}/Rakefile resque:scheduler RAILS_ENV=#{rails_env}"
w.start = "HOME= #{user_home} QUEUE=* RAILS_ENV=#{rails_env}" rake -f #{rails_root}/Rakefile resque:scheduler
w.uid = (rails_env == 'production' )? "root" : development_uid
w.gid = (rails_env == 'production' )? "root" : development_gid
w.log = (rails_env == 'production' )? "/var/log/#{w.group}-#{w.name}.log":"#{rails_root}/log/dev_resque-#{w.name}.log"
w.log = (rails_env == 'production' )? "/var/log/#{w.group}/#{w.name}.log":"#{rails_root}/log/dev_resque-#{w.name}.log"
# restart if memory gets too high
w.transition(:up, :restart) do |on|