diff --git a/lib/resque/integration/engine.rb b/lib/resque/integration/engine.rb index 2e7a7bf..4daa005 100644 --- a/lib/resque/integration/engine.rb +++ b/lib/resque/integration/engine.rb @@ -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