File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
railties/lib/rails/generators/rails/app/templates/config Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 20
20
# Any libraries that use a connection pool or another resource pool should
21
21
# be configured to provide at least as many connections as the number of
22
22
# threads. This includes Active Record's `pool` parameter in `database.yml`.
23
- threads_count = ENV.fetch("RAILS_MAX_THREADS") { 3 }
23
+ threads_count = ENV.fetch("RAILS_MAX_THREADS", 3)
24
24
threads threads_count, threads_count
25
25
26
26
# Specifies the `environment` that Puma will run in.
@@ -35,7 +35,7 @@ when "production"
35
35
# It defaults to 1 because it's impossible to reliably detect how many
36
36
# CPU cores are available. Make sure to set the `WEB_CONCURRENCY` environment
37
37
# variable to match the number of processors.
38
- workers_count = Integer(ENV.fetch("WEB_CONCURRENCY") { 1 } )
38
+ workers_count = Integer(ENV.fetch("WEB_CONCURRENCY", 1) )
39
39
workers workers_count if workers_count > 1
40
40
41
41
preload_app!
@@ -46,7 +46,7 @@ when "development"
46
46
end
47
47
48
48
# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
49
- port ENV.fetch("PORT") { 3000 }
49
+ port ENV.fetch("PORT", 3000)
50
50
51
51
# Allow puma to be restarted by `bin/rails restart` command.
52
52
plugin :tmp_restart
You can’t perform that action at this time.
0 commit comments