Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated initializers

  • Loading branch information...
commit bcc841033c35d158b22a21dcc5607963cd522d16 1 parent a187032
@avokhmin avokhmin authored
View
0  config/initializers/a_app_config.rb → config/initializers/0_app_config.rb
File renamed without changes
View
2  config/initializers/resque.rb → config/initializers/1_resque.rb
@@ -14,3 +14,5 @@
end
Resque::Plugins::Status::Hash.expire_in = (24 * 60 * 60) # 24hrs in seconds
+
+Resque.before_fork = Proc.new { ActiveRecord::Base.establish_connection }
View
3  lib/tasks/resque.rake
@@ -1,3 +1,5 @@
+require 'resque/tasks'
+
namespace :resque do
desc 'Stop all Resque workers'
task stop_workers: :environment do
@@ -12,6 +14,7 @@ namespace :resque do
Resque.after_fork do
Resque.redis.client.reconnect
end
+ Resque.before_fork = Proc.new { ActiveRecord::Base.establish_connection }
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.