aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Schneeman <richard.schneeman+no-recruiters@gmail.com>2018-07-21 19:05:37 -0500
committerGitHub <noreply@github.com>2018-07-21 19:05:37 -0500
commitd3ba91315852d27e95a935359f4ad752c27d02d3 (patch)
treefbd4403d50bb5dd83af9550e72c26fec1679e997
parentc11fc3b71c2418e07f1b21ed317d626bc94e17c5 (diff)
parentddfcdffb3bec0f0befa6901093064336cf3d7a80 (diff)
downloadrails-d3ba91315852d27e95a935359f4ad752c27d02d3.tar.gz
rails-d3ba91315852d27e95a935359f4ad752c27d02d3.tar.bz2
rails-d3ba91315852d27e95a935359f4ad752c27d02d3.zip
Merge pull request #32984 from chiraggshah/min-thread-env-variable
Separate min and max threads count environment variable for puma configuration
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/puma.rb.tt5
1 files changed, 3 insertions, 2 deletions
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..f6146e7259 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
+max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
+min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
+threads min_threads_count, max_threads_count
# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
#