Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

メールのジョブの永続化を実装 #12

Merged
merged 1 commit into from
Jul 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,5 @@ gem 'slim-rails'
gem 'sorcery'
gem 'config'
gem 'letter_opener_web'
gem 'sidekiq'
gem 'sinatra'
16 changes: 16 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ GEM
config (3.1.0)
deep_merge (~> 1.2, >= 1.2.1)
dry-validation (~> 1.0, >= 1.0.0)
connection_pool (2.2.5)
crass (1.0.6)
debug_inspector (1.1.0)
deep_merge (1.2.1)
Expand Down Expand Up @@ -203,6 +204,8 @@ GEM
multi_json (1.15.0)
multi_xml (0.6.0)
multipart-post (2.1.1)
mustermann (1.1.1)
ruby2_keywords (~> 0.0.1)
mysql2 (0.5.3)
nio4r (2.5.7)
nokogiri (1.11.7-x86_64-darwin)
Expand Down Expand Up @@ -230,6 +233,8 @@ GEM
puma (3.12.6)
racc (1.5.2)
rack (2.2.3)
rack-protection (2.1.0)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.2.6)
Expand Down Expand Up @@ -325,6 +330,15 @@ GEM
selenium-webdriver (3.142.7)
childprocess (>= 0.5, < 4.0)
rubyzip (>= 1.2.2)
sidekiq (6.2.1)
connection_pool (>= 2.2.2)
rack (~> 2.0)
redis (>= 4.2.0)
sinatra (2.1.0)
mustermann (~> 1.0)
rack (~> 2.2)
rack-protection (= 2.1.0)
tilt (~> 2.0)
slim (4.1.0)
temple (>= 0.7.6, < 0.9)
tilt (>= 2.0.6, < 2.1)
Expand Down Expand Up @@ -403,6 +417,8 @@ DEPENDENCIES
rubocop-rails
sass-rails (~> 5.0)
selenium-webdriver
sidekiq
sinatra
slim-rails
sorcery
spring
Expand Down
1 change: 1 addition & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class Application < Rails::Application
config.active_record.default_timezone = :local
config.i18n.default_locale = :ja
config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}').to_s]
config.active_job.queue_adapter = :sidekiq

config.generators do |g|
g.assets false
Expand Down
11 changes: 11 additions & 0 deletions config/initializers/sidekiq.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Sidekiq.configure_server do |config|
config.redis = {
url: 'redis://localhost:6379'
}
end

Sidekiq.configure_client do |config|
config.redis = {
url: 'redis://localhost:6379'
}
end
2 changes: 2 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# frozen_string_literal: true
require 'sidekiq/web'

Rails.application.routes.draw do
if Rails.env.development?
mount LetterOpenerWeb::Engine, at: '/letter_opener'
mount Sidekiq::Web, at: '/sidekiq'
end
root 'posts#index'

Expand Down
4 changes: 4 additions & 0 deletions config/sidekiq.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
:concurrency: 25
:queues:
- default
- mailers
Binary file modified dump.rdb
Binary file not shown.