Add sidekiq
This commit is contained in:
parent
3c55c64b3f
commit
285cf78d63
2
Gemfile
2
Gemfile
@ -74,3 +74,5 @@ end
|
|||||||
gem "tailwindcss-rails", "~> 2.0"
|
gem "tailwindcss-rails", "~> 2.0"
|
||||||
gem "font-awesome-sass"
|
gem "font-awesome-sass"
|
||||||
gem "httparty"
|
gem "httparty"
|
||||||
|
|
||||||
|
gem "sidekiq"
|
||||||
|
|||||||
@ -82,6 +82,7 @@ GEM
|
|||||||
regexp_parser (>= 1.5, < 3.0)
|
regexp_parser (>= 1.5, < 3.0)
|
||||||
xpath (~> 3.2)
|
xpath (~> 3.2)
|
||||||
concurrent-ruby (1.2.2)
|
concurrent-ruby (1.2.2)
|
||||||
|
connection_pool (2.4.1)
|
||||||
crass (1.0.6)
|
crass (1.0.6)
|
||||||
date (3.3.3)
|
date (3.3.3)
|
||||||
debug (1.8.0)
|
debug (1.8.0)
|
||||||
@ -177,6 +178,8 @@ GEM
|
|||||||
rdoc (6.5.0)
|
rdoc (6.5.0)
|
||||||
psych (>= 4.0.0)
|
psych (>= 4.0.0)
|
||||||
redis (4.8.1)
|
redis (4.8.1)
|
||||||
|
redis-client (0.17.0)
|
||||||
|
connection_pool
|
||||||
regexp_parser (2.8.1)
|
regexp_parser (2.8.1)
|
||||||
reline (0.3.8)
|
reline (0.3.8)
|
||||||
io-console (~> 0.5)
|
io-console (~> 0.5)
|
||||||
@ -188,6 +191,11 @@ GEM
|
|||||||
rexml (~> 3.2, >= 3.2.5)
|
rexml (~> 3.2, >= 3.2.5)
|
||||||
rubyzip (>= 1.2.2, < 3.0)
|
rubyzip (>= 1.2.2, < 3.0)
|
||||||
websocket (~> 1.0)
|
websocket (~> 1.0)
|
||||||
|
sidekiq (7.1.4)
|
||||||
|
concurrent-ruby (< 2)
|
||||||
|
connection_pool (>= 2.3.0)
|
||||||
|
rack (>= 2.2.4)
|
||||||
|
redis-client (>= 0.14.0)
|
||||||
sprockets (4.2.1)
|
sprockets (4.2.1)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
rack (>= 2.2.4, < 4)
|
rack (>= 2.2.4, < 4)
|
||||||
@ -241,6 +249,7 @@ DEPENDENCIES
|
|||||||
rails (~> 7.0.7, >= 7.0.7.2)
|
rails (~> 7.0.7, >= 7.0.7.2)
|
||||||
redis (~> 4.0)
|
redis (~> 4.0)
|
||||||
selenium-webdriver
|
selenium-webdriver
|
||||||
|
sidekiq
|
||||||
sprockets-rails
|
sprockets-rails
|
||||||
stimulus-rails
|
stimulus-rails
|
||||||
tailwindcss-rails (~> 2.0)
|
tailwindcss-rails (~> 2.0)
|
||||||
|
|||||||
3
Procfile
Normal file
3
Procfile
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
css: bin/rails tailwindcss:watch
|
||||||
|
redis: /opt/homebrew/opt/redis/bin/redis-server /opt/homebrew/etc/redis.conf
|
||||||
|
sidekiq: bundle exec sidekiq -C config/sidekiq.yml
|
||||||
@ -1,2 +0,0 @@
|
|||||||
web: bin/rails server -p 3000
|
|
||||||
css: bin/rails tailwindcss:watch
|
|
||||||
@ -11,6 +11,8 @@ module LectureAttendanceManager
|
|||||||
# Initialize configuration defaults for originally generated Rails version.
|
# Initialize configuration defaults for originally generated Rails version.
|
||||||
config.load_defaults 7.0
|
config.load_defaults 7.0
|
||||||
|
|
||||||
|
config.active_job.queue_adapter = :sidekiq
|
||||||
|
|
||||||
# Configuration for the application, engines, and railties goes here.
|
# Configuration for the application, engines, and railties goes here.
|
||||||
#
|
#
|
||||||
# These settings can be overridden in specific environments using the files
|
# These settings can be overridden in specific environments using the files
|
||||||
|
|||||||
7
config/initializers/sidekiq.rb
Normal file
7
config/initializers/sidekiq.rb
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
Sidekiq.configure_server do |config|
|
||||||
|
config.redis = { url: ENV['REDIS_URL'] }
|
||||||
|
end
|
||||||
|
|
||||||
|
Sidekiq.configure_client do |config|
|
||||||
|
config.redis = { url: ENV['REDIS_URL'] }
|
||||||
|
end
|
||||||
13
config/sidekiq.yml
Normal file
13
config/sidekiq.yml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
:concurrency: 5
|
||||||
|
staging:
|
||||||
|
:concurrency: 10
|
||||||
|
production:
|
||||||
|
:concurrency: 20
|
||||||
|
:queues:
|
||||||
|
- default
|
||||||
|
- mailers
|
||||||
|
|
||||||
|
# These are the cron jobs
|
||||||
|
:scheduler:
|
||||||
|
:schedule:
|
||||||
Loading…
Reference in New Issue
Block a user