Skip to content

Commit

Permalink
Merge pull request #12614 from empirical-org/develop
Browse files Browse the repository at this point in the history
Fix on_worker_boot warning (#12610)
  • Loading branch information
brendanshean authored Dec 2, 2024
2 parents ceeebc7 + 2311087 commit 2393819
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions services/QuillLMS/config/puma.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@
environment ENV['RACK_ENV'] || 'development'

on_worker_boot do
# worker specific setup
ActiveSupport.on_load(:active_record) do
config = ActiveRecord::Base.configurations[Rails.env] ||
Rails.application.config.database_configuration[Rails.env]
config['pool'] = ENV['MAX_THREADS'] || 16
config = ActiveRecord::Base.configurations.configs_for(env_name: Rails.env, name: 'primary').configuration_hash
config[:pool] = ENV['MAX_THREADS'] || 16
ActiveRecord::Base.establish_connection(config)
end
end

0 comments on commit 2393819

Please sign in to comment.