From 94a5125508add2d036bffc80a54a9f07d6feb657 Mon Sep 17 00:00:00 2001 From: Chirag Shah Date: Fri, 25 May 2018 06:55:48 +0530 Subject: Separate min and max threads count for puma Same environment variable RAILS_MAX_THREADS was being used for setting the minimum and maximum thread count for puma. This change makes it obvious and easy to decide which environment variable to change for setting the min or max. Don't feel like this is a breaking change as the same default is maintained. --- railties/lib/rails/generators/rails/app/templates/config/puma.rb.tt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'railties') diff --git a/railties/lib/rails/generators/rails/app/templates/config/puma.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/puma.rb.tt index a5eccf816b..da3f99ec2b 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/puma.rb.tt +++ b/railties/lib/rails/generators/rails/app/templates/config/puma.rb.tt @@ -4,8 +4,9 @@ # the maximum value specified for Puma. Default is set to 5 threads for minimum # and maximum; this matches the default thread size of Active Record. # -threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } -threads threads_count, threads_count +min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { 5 } +max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } +threads min_threads_count, max_threads_count # Specifies the `port` that Puma will listen on to receive requests; default is 3000. # -- cgit v1.2.3