Skip to content

Commit

Permalink
Reestablish redis connection in each new fork
Browse files Browse the repository at this point in the history
  • Loading branch information
take-five committed Apr 8, 2013
1 parent 5274eeb commit 10201e4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/resque/integration/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ class Engine < Rails::Engine

Resque.redis = [redis.host, redis.port, redis.db].join(':')
Resque.redis.namespace = redis.namespace

# Reconnect on each fork
Resque.after_fork { Resque.redis.client.reconnect }
end

initializer 'resque-integration.failure_notifier' do
Expand Down

0 comments on commit 10201e4

Please sign in to comment.