feat(puma): enable setting min puma threads in addition to max (#21048)

This commit is contained in:
Jim Myhrberg 2023-01-06 06:55:58 +00:00 committed by GitHub
parent 264655c53a
commit 85ec615393
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,8 @@
persistent_timeout ENV.fetch('PERSISTENT_TIMEOUT') { 20 }.to_i persistent_timeout ENV.fetch('PERSISTENT_TIMEOUT') { 20 }.to_i
threads_count = ENV.fetch('MAX_THREADS') { 5 }.to_i max_threads_count = ENV.fetch('MAX_THREADS') { 5 }.to_i
threads threads_count, threads_count min_threads_count = ENV.fetch('MIN_THREADS') { max_threads_count }.to_i
threads min_threads_count, max_threads_count
if ENV['SOCKET'] if ENV['SOCKET']
bind "unix://#{ENV['SOCKET']}" bind "unix://#{ENV['SOCKET']}"
@ -10,7 +11,7 @@ else
end end
environment ENV.fetch('RAILS_ENV') { 'development' } environment ENV.fetch('RAILS_ENV') { 'development' }
workers ENV.fetch('WEB_CONCURRENCY') { 2 } workers ENV.fetch('WEB_CONCURRENCY') { 2 }.to_i
preload_app! preload_app!