use sidekiq
This commit is contained in:
+10
-3
@@ -5,7 +5,9 @@
|
||||
# Any libraries that use thread pools should be configured to match
|
||||
# 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.
|
||||
#
|
||||
|
||||
require_relative 'dotenv'
|
||||
|
||||
max_threads_count = ENV.fetch('RAILS_MAX_THREADS', 15)
|
||||
min_threads_count = ENV.fetch('RAILS_MIN_THREADS') { max_threads_count }
|
||||
threads min_threads_count, max_threads_count
|
||||
@@ -41,5 +43,10 @@ workers ENV.fetch('WEB_CONCURRENCY', 0)
|
||||
#
|
||||
# preload_app!
|
||||
|
||||
# Allow puma to be restarted by `bin/rails restart` command.
|
||||
plugin :tmp_restart
|
||||
if ENV['MULTITENANT'] != 'true' || ENV['DEMO'] == 'true'
|
||||
require_relative '../lib/puma/plugin/redis_server'
|
||||
require_relative '../lib/puma/plugin/sidekiq_embed'
|
||||
|
||||
plugin :sidekiq_embed
|
||||
plugin :redis_server
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user