fix rescue job won't start
This commit is contained in:
parent
a0478f2a8f
commit
12e39b4d77
|
@ -10,8 +10,8 @@ num_workers.times do |num|
|
||||||
God.watch do |w|
|
God.watch do |w|
|
||||||
|
|
||||||
w.dir = rails_root
|
w.dir = rails_root
|
||||||
w.name = "resque-#{num}"
|
w.name = "worker-#{num}"
|
||||||
w.group = 'nccu_production'
|
w.group = 'resque'
|
||||||
|
|
||||||
w.interval = 30.seconds
|
w.interval = 30.seconds
|
||||||
|
|
||||||
|
@ -25,12 +25,12 @@ num_workers.times do |num|
|
||||||
end
|
end
|
||||||
|
|
||||||
w.env = {"QUEUE"=>queue, "RAILS_ENV"=>rails_env}
|
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.uid = (rails_env == 'production' )? "root" : development_uid
|
||||||
w.gid = (rails_env == 'production' )? "root" : development_gid
|
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
|
# restart if memory gets too high
|
||||||
w.transition(:up, :restart) do |on|
|
w.transition(:up, :restart) do |on|
|
||||||
|
|
|
@ -6,16 +6,16 @@ development_gid = ''
|
||||||
|
|
||||||
God.watch do |w|
|
God.watch do |w|
|
||||||
w.dir = rails_root
|
w.dir = rails_root
|
||||||
w.name = "resque-scheduler"
|
w.name = "scheduler"
|
||||||
w.group = 'nccu_production'
|
w.group = 'resque'
|
||||||
w.interval = 30.seconds
|
w.interval = 30.seconds
|
||||||
w.env = {"QUEUE"=>"critical,high,low", "RAILS_ENV"=>rails_env}
|
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.uid = (rails_env == 'production' )? "root" : development_uid
|
||||||
w.gid = (rails_env == 'production' )? "root" : development_gid
|
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
|
# restart if memory gets too high
|
||||||
w.transition(:up, :restart) do |on|
|
w.transition(:up, :restart) do |on|
|
||||||
|
|
Loading…
Reference in New Issue