Skip to content

Commit

Permalink
Configure Redis et Sidekiq
Browse files Browse the repository at this point in the history
  • Loading branch information
cprodhomme authored and etienneCharignon committed Apr 13, 2021
1 parent 15ef50d commit 45df2fd
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ gem 'rack-cors', require: 'rack/cors'
gem 'rails-i18n'
gem 'random_name_generator'
gem 'redcarpet'
gem 'redis'
gem 'rollbar'
gem 'sidekiq'
gem 'wicked_pdf'
gem 'wkhtmltopdf-binary', '~> 0.12.3.1'

Expand Down
8 changes: 8 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ GEM
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.1.8)
connection_pool (2.2.3)
crass (1.0.6)
descriptive_statistics (2.4.0)
devise (4.7.3)
Expand Down Expand Up @@ -324,6 +325,7 @@ GEM
rb-inotify (0.10.1)
ffi (~> 1.0)
redcarpet (3.5.1)
redis (4.2.5)
regexp_parser (2.1.1)
require_all (1.5.0)
responders (3.0.1)
Expand Down Expand Up @@ -392,6 +394,10 @@ GEM
shellany (0.0.1)
shoulda-matchers (4.5.1)
activesupport (>= 4.2.0)
sidekiq (6.2.1)
connection_pool (>= 2.2.2)
rack (~> 2.0)
redis (>= 4.2.0)
spreadsheet (1.2.8)
ruby-ole
spring (2.1.1)
Expand Down Expand Up @@ -465,12 +471,14 @@ DEPENDENCIES
rails-i18n
random_name_generator
redcarpet
redis
rollbar
rspec-rails
rspec_junit_formatter (~> 0.4.1)
rubocop
rubocop-rspec
shoulda-matchers
sidekiq
spring
spring-watcher-listen (~> 2.0.0)
tarteaucitron
Expand Down
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
web: bundle exec rails server
postdeploy: bin/postdeploy.sh
worker: bundle exec sidekiq
2 changes: 2 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ class Application < Rails::Application
protocol: ENV['PROTOCOLE_SERVEUR']
}

config.active_job.queue_adapter = :sidekiq

config.middleware.insert_before 0, Rack::Cors do
allow do
origins '*'
Expand Down
3 changes: 3 additions & 0 deletions spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# Prevent database truncation if the environment is production
abort('The Rails environment is running in production mode!') if Rails.env.production?
require 'rspec/rails'
require 'sidekiq/testing'
# Add additional requires below this line. Rails is not loaded until this point!

# Requires supporting ruby files with custom matchers and macros, etc, in
Expand All @@ -24,6 +25,8 @@
#
# Dir[Rails.root.join('spec', 'support', '**', '*.rb')].each { |f| require f }

Sidekiq::Testing.fake!

# Checks for pending migrations and applies them before tests are run.
# If you are not using ActiveRecord, you can remove these lines.
begin
Expand Down

0 comments on commit 45df2fd

Please sign in to comment.