mirror of https://github.com/rails/rails
fix comparison type issue in puma.rb template (#46874)
* fix comparison type issue in puma.rb template * Ensure integer Co-authored-by: David Heinemeier Hansson <dhh@hey.com>
This commit is contained in:
parent
6287c109d3
commit
fad500b8c6
|
@ -13,7 +13,7 @@ threads min_threads_count, max_threads_count
|
||||||
|
|
||||||
# Specifies that the worker count should equal the number of processors in production.
|
# Specifies that the worker count should equal the number of processors in production.
|
||||||
if ENV["RAILS_ENV"] == "production"
|
if ENV["RAILS_ENV"] == "production"
|
||||||
worker_count = ENV.fetch("WEB_CONCURRENCY") { Concurrent.physical_processor_count }
|
worker_count = Integer(ENV.fetch("WEB_CONCURRENCY") { Concurrent.physical_processor_count })
|
||||||
workers worker_count if worker_count > 1
|
workers worker_count if worker_count > 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue