From 12e39b4d773ce7ec5aecbfd606c59793d80c1f5c Mon Sep 17 00:00:00 2001 From: "Matt K. Fu" Date: Thu, 25 Apr 2013 15:46:16 +0800 Subject: [PATCH] fix rescue job won't start --- config/resque.god | 8 ++++---- config/resque_schedule.god | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config/resque.god b/config/resque.god index 8a1b03ab..f97571dc 100644 --- a/config/resque.god +++ b/config/resque.god @@ -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| diff --git a/config/resque_schedule.god b/config/resque_schedule.god index 5f136438..d83c4910 100644 --- a/config/resque_schedule.god +++ b/config/resque_schedule.god @@ -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|