app:update
This commit is contained in:
@@ -23,27 +23,6 @@
|
||||
threads_count = ENV.fetch("RAILS_MAX_THREADS", 3)
|
||||
threads threads_count, threads_count
|
||||
|
||||
# Specifies the `environment` that Puma will run in.
|
||||
rails_env = ENV.fetch("RAILS_ENV", "development")
|
||||
environment rails_env
|
||||
|
||||
case rails_env
|
||||
when "production"
|
||||
# If you are running more than 1 thread per process, the workers count
|
||||
# should be equal to the number of processors (CPU cores) in production.
|
||||
#
|
||||
# Automatically detect the number of available processors in production.
|
||||
require "concurrent-ruby"
|
||||
workers_count = Integer(ENV.fetch("WEB_CONCURRENCY") { Concurrent.available_processor_count })
|
||||
workers workers_count if workers_count > 1
|
||||
|
||||
preload_app!
|
||||
when "development"
|
||||
# Specifies a very generous `worker_timeout` so that the worker
|
||||
# isn't killed by Puma when suspended by a debugger.
|
||||
worker_timeout 3600
|
||||
end
|
||||
|
||||
# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
|
||||
port ENV.fetch("PORT", 3000)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user