Ajout de Sidekiq pour traiter les queues
This commit is contained in:
parent
9f86e66b7c
commit
18d7316f1d
1
Gemfile
1
Gemfile
|
@ -28,6 +28,7 @@ gem 'jbuilder', '~> 2.7'
|
|||
gem 'elasticsearch-persistence'
|
||||
gem 'elasticsearch-rails'
|
||||
|
||||
gem 'sidekiq'
|
||||
|
||||
# gem 'dry-types'
|
||||
gem 'dry-struct'
|
||||
|
|
|
@ -78,6 +78,7 @@ GEM
|
|||
childprocess (3.0.0)
|
||||
coderay (1.1.3)
|
||||
concurrent-ruby (1.1.7)
|
||||
connection_pool (2.2.3)
|
||||
crass (1.0.6)
|
||||
dry-configurable (0.11.6)
|
||||
concurrent-ruby (~> 1.0)
|
||||
|
@ -200,6 +201,7 @@ GEM
|
|||
rb-fsevent (0.10.4)
|
||||
rb-inotify (0.10.1)
|
||||
ffi (~> 1.0)
|
||||
redis (4.2.5)
|
||||
regexp_parser (1.8.2)
|
||||
ruby2_keywords (0.0.2)
|
||||
rubyzip (2.3.0)
|
||||
|
@ -216,6 +218,10 @@ GEM
|
|||
selenium-webdriver (3.142.7)
|
||||
childprocess (>= 0.5, < 4.0)
|
||||
rubyzip (>= 1.2.2)
|
||||
sidekiq (6.1.2)
|
||||
connection_pool (>= 2.2.2)
|
||||
rack (~> 2.0)
|
||||
redis (>= 4.2.0)
|
||||
spring (2.1.1)
|
||||
spring-watcher-listen (2.0.1)
|
||||
listen (>= 2.7, < 4.0)
|
||||
|
@ -272,6 +278,7 @@ DEPENDENCIES
|
|||
rails (~> 6.1.0)
|
||||
sass-rails (>= 6)
|
||||
selenium-webdriver
|
||||
sidekiq
|
||||
spring
|
||||
spring-watcher-listen (~> 2.0.0)
|
||||
sqlite3 (~> 1.4)
|
||||
|
|
|
@ -12,6 +12,8 @@ module Evobal
|
|||
# Initialize configuration defaults for originally generated Rails version.
|
||||
config.load_defaults 6.0
|
||||
|
||||
config.active_job.queue_adapter = :sidekiq
|
||||
|
||||
# Settings in config/environments/* take precedence over those specified here.
|
||||
# Application configuration can go into files in config/initializers
|
||||
# -- all .rb files in that directory are automatically loaded after loading
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
require 'sidekiq/web'
|
||||
|
||||
Rails.application.routes.draw do
|
||||
resources :emails
|
||||
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
|
||||
mount Sidekiq::Web => '/sidekiq'
|
||||
end
|
||||
|
|
13
config/sidekiq.yml
Normal file
13
config/sidekiq.yml
Normal file
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
|
||||
:concurrency: 2
|
||||
staging:
|
||||
:concurrency: 10
|
||||
production:
|
||||
:concurrency: 20
|
||||
:queues:
|
||||
- default
|
||||
- mailers
|
||||
- action_mailbox_routing
|
||||
- active_storage_analysis
|
||||
- action_mailbox_incineration
|
Loading…
Reference in a new issue