puma.rb 276 B

12345678910
  1. workers Integer(ENV['WEB_CONCURRENCY'] || 0)
  2. threads_count_min = Integer(ENV['MIN_THREADS'] || 5)
  3. threads_count_max = Integer(ENV['MAX_THREADS'] || 30)
  4. threads threads_count_min, threads_count_max
  5. preload_app!
  6. on_worker_boot do
  7. ActiveRecord::Base.establish_connection
  8. end