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.425 config/initializers/database.rb
lalala-4.1.0.dev.420 config/initializers/database.rb
lalala-4.1.0.dev.419 config/initializers/database.rb
lalala-4.1.0.dev.418 config/initializers/database.rb
lalala-4.1.0.dev.417 config/initializers/database.rb
lalala-4.0.0.dev.416 config/initializers/database.rb
lalala-4.1.0.dev.415 config/initializers/database.rb
lalala-4.1.0.dev.414 config/initializers/database.rb
lalala-4.1.0.dev.413 config/initializers/database.rb
lalala-4.1.0.dev.412 config/initializers/database.rb
lalala-4.1.0.dev.411 config/initializers/database.rb
lalala-4.1.0.dev.410 config/initializers/database.rb
lalala-4.1.0.dev.409 config/initializers/database.rb
lalala-4.0.0.dev.407 config/initializers/database.rb
lalala-4.1.0.dev.408 config/initializers/database.rb
lalala-4.1.0.dev.398 config/initializers/database.rb
lalala-4.1.0.dev.397 config/initializers/database.rb
lalala-4.0.0.dev.396 config/initializers/database.rb
lalala-4.0.0.dev.395 config/initializers/database.rb
lalala-4.1.0.dev.394 config/initializers/database.rb