cleanup
This commit is contained in:
parent
c54225ec03
commit
092bc10b2c
6
Rakefile
6
Rakefile
|
@ -8,6 +8,12 @@ require 'resque_scheduler/tasks'
|
|||
|
||||
# This fixes connection fail with Postgres server on new fork:
|
||||
task "resque:setup" => :environment do
|
||||
require 'resque'
|
||||
require 'resque-scheduler'
|
||||
Resque.after_fork do
|
||||
Resque.redis.client.reconnect
|
||||
Resque.schedule = YAML.load_file(File.join(Rails.root, 'config/resque_schedule.yml')) # load the schedule
|
||||
end
|
||||
Resque.before_fork = Proc.new { ActiveRecord::Base.establish_connection }
|
||||
end
|
||||
|
||||
|
|
|
@ -10,12 +10,6 @@ Resque::Mailer.excluded_environments = [:test]
|
|||
|
||||
unless Rails.env.test?
|
||||
PerformLater.config.enabled = true # this will default to false if unset
|
||||
Resque.schedule = YAML.load_file(File.join(Rails.root, 'config/resque_schedule.yml')) # load the schedule
|
||||
end
|
||||
|
||||
Resque::Plugins::Status::Hash.expire_in = (24 * 60 * 60) # 24hrs in seconds
|
||||
|
||||
Resque.before_fork = Proc.new { ActiveRecord::Base.establish_connection }
|
||||
Resque.after_fork do
|
||||
Resque.redis.client.reconnect
|
||||
end
|
||||
Resque::Plugins::Status::Hash.expire_in = (24 * 60 * 60) # 24hrs in seconds
|
Loading…
Reference in New Issue