Sha256: 510d9bb29b0c3b3028d3f567edc34fc6ff4f45d0bfffd3984b99627cc12c850b

Contents?: true

Size: 402 Bytes

Versions: 110

Compression:

Stored size: 402 Bytes

Contents

Rails.application.config.after_initialize do
  ActiveRecord::Base.connection_pool.disconnect!

  ActiveSupport.on_load(:active_record) do
    config = Rails.application.config.database_configuration[Rails.env]
    config['reaping_frequency'] = ENV['DB_REAP_FREQ'] || 10 # seconds
    config['pool']              = ENV['DB_POOL']      || 16
    ActiveRecord::Base.establish_connection(config)
  end
end

Version data entries

110 entries across 110 versions & 1 rubygems

Version Path
lalala-4.1.0.dev.392 config/initializers/database.rb
lalala-4.0.0.dev.393 config/initializers/database.rb
lalala-4.1.0.dev.391 config/initializers/database.rb
lalala-4.1.0.dev.390 config/initializers/database.rb
lalala-4.1.0.dev.389 config/initializers/database.rb
lalala-4.0.0.dev.388 config/initializers/database.rb
lalala-4.1.0.dev.387 config/initializers/database.rb
lalala-4.1.0.dev.386 config/initializers/database.rb
lalala-4.0.0.dev.385 config/initializers/database.rb
lalala-4.1.0.dev.384 config/initializers/database.rb
lalala-4.0.0.dev.382 config/initializers/database.rb
lalala-4.1.0.dev.381 config/initializers/database.rb
lalala-4.1.0.dev.376 config/initializers/database.rb
lalala-4.1.0.dev.375 config/initializers/database.rb
lalala-4.0.0.dev.374 config/initializers/database.rb
lalala-4.0.0.dev.372 config/initializers/database.rb
lalala-4.0.0.dev.368 config/initializers/database.rb
lalala-4.1.0.dev.367 config/initializers/database.rb
lalala-4.0.0.dev.366 config/initializers/database.rb
lalala-4.1.0.dev.360 config/initializers/database.rb