This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/config/initializers/redis.rb

11 lines
402 B
Ruby

if defined?(PhusionPassenger)
PhusionPassenger.on_event(:starting_worker_process) do |forked|
if forked
Resque.redis.client.disconnect
Resque.redis = Redis.new(:host => 'localhost', :port => 6379)
Resque.redis.namespace = Site.first.resque_namespace rescue APP_CONFIG['orbit']
else
# We're in conservative spawning mode. We don't need to do anything.
end
end
end