From d9f2a9f7fb9a2c0284144fa1d17556b98126aa4b Mon Sep 17 00:00:00 2001 From: Wedge Date: Sat, 6 Apr 2019 18:26:11 +0300 Subject: [PATCH] Use database url --- config/puma/production.rb | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/config/puma/production.rb b/config/puma/production.rb index 798ea3ac8..e26054c95 100644 --- a/config/puma/production.rb +++ b/config/puma/production.rb @@ -12,16 +12,8 @@ on_worker_boot do if defined?(ActiveRecord::Base) ActiveSupport.on_load(:active_record) do ActiveRecord::Base.connection.disconnect! rescue ActiveRecord::ConnectionNotEstablished - - config = Rails.application.config.database_configuration[Rails.env] - # config['reaping_frequency'] = ENV['DB_REAP_FREQ'] || 10 # seconds - # config['pool'] = ENV['DB_POOL'] || 3 - - ActiveRecord::Base.establish_connection(config) - - Rails.logger.info "Connected to PG. Connection pool size #{config['pool']}, reaping frequency #{config['reaping_frequency']}" + ActiveRecord::Base.establish_connection end - # QC::Conn.connect Rails.logger.info('Connected to PG') end