Sha256: 07476c2cc7b55d1ae2fd6bc969e03afd130c0c5048ebaa473c97a9665d083132
Contents?: true
Size: 805 Bytes
Versions: 5
Compression:
Stored size: 805 Bytes
Contents
worker_processes 2 timeout 30 preload_app true before_fork do |server, worker| # Replace with MongoDB or whatever if defined?(ActiveRecord::Base) ActiveRecord::Base.connection.disconnect! Rails.logger.info('Disconnected from ActiveRecord') end # If you are using Redis but not Resque, change this if defined?(Resque) Resque.redis.quit Rails.logger.info('Disconnected from Redis') end sleep 1 end after_fork do |server, worker| # Replace with MongoDB or whatever if defined?(ActiveRecord::Base) ActiveRecord::Base.establish_connection Rails.logger.info('Connected to ActiveRecord') end # If you are using Redis but not Resque, change this if defined?(Resque) Resque.redis = ENV["REDISTOGO_URL"] Rails.logger.info('Connected to Redis') end end
Version data entries
5 entries across 5 versions & 1 rubygems