Skip to content

Commit 009a42f

Browse files
committed
Add Solid Queue plugin to Puma if enables by ENV
1 parent 14e54ea commit 009a42f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

config/puma.rb

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
# This configuration file will be evaluated by Puma. The top-level methods that
22
# are invoked here are part of Puma's configuration DSL. For more information
33
# about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html.
4-
4+
#
55
# Puma starts a configurable number of processes (workers) and each process
66
# serves each request in a thread from an internal thread pool.
77
#
8+
# You can control the number of workers using ENV["WEB_CONCURRENCY"]. You
9+
# should only set this value when you want to run 2 or more workers. The
10+
# default is already 1.
11+
#
812
# The ideal number of threads per worker depends both on how much time the
913
# application spends waiting for IO operations and on how much you wish to
10-
# to prioritize throughput over latency.
14+
# prioritize throughput over latency.
1115
#
1216
# As a rule of thumb, increasing the number of threads will increase how much
1317
# traffic a given process can handle (throughput), but due to CRuby's
@@ -29,6 +33,9 @@
2933
# Allow puma to be restarted by `bin/rails restart` command.
3034
plugin :tmp_restart
3135

36+
# Run the Solid Queue supervisor inside of Puma for single-server deployments
37+
plugin :solid_queue if ENV["SOLID_QUEUE_IN_PUMA"]
38+
3239
# Specify the PID file. Defaults to tmp/pids/server.pid in development.
3340
# In other environments, only set the PID file if requested.
3441
pidfile ENV["PIDFILE"] if ENV["PIDFILE"]

0 commit comments

Comments
 (0)