rabbit-slide-nishidayuya-2025-07-25-redmine_japan_vol4-redmine_meets_solid_queue 2025.7.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: e3e5a5e0ff9f15d36711a7ce7ced626b639a020b2fda2d8972330d120ec2ebe5
4
+ data.tar.gz: b2ecb50e4d1b958e6fc43993bd6a65ed36149625f26d4673ccf2bab2530bff09
5
+ SHA512:
6
+ metadata.gz: 173e3fb6ab2e1d43027b99497e9632981a7bbd5e7e9940b29a002862fa235f5fb096fe05ec06517c8f789e9d9d0e2b0fcac37b505456ca962f6082d29a0400ba
7
+ data.tar.gz: 4bd16ce89acbea2fadabc597998fdc81d497462458dc0b45bdf6bdfcd7a1ab70448e7e503794472d68ff9225b333e2c5da6068b6a0f8d808ab70e4896ee0c915
data/.rabbit ADDED
@@ -0,0 +1,2 @@
1
+ --size 1368,768
2
+ redmine_meets_solid_queue.md
data/README.md ADDED
@@ -0,0 +1,24 @@
1
+ # Redmine × Solid Queue: 安心簡単キュー構成
2
+
3
+ 2025-07-25に開催された[REDMINE JAPAN vol.4](https://redmine-japan.org/vol-4/time-table/#a07-3)の発表資料
4
+
5
+ ## 作者向け
6
+
7
+ ### 表示
8
+
9
+ rake
10
+
11
+ ### 公開
12
+
13
+ rake publish
14
+
15
+ ## 閲覧者向け
16
+
17
+ ### インストール
18
+
19
+ gem install rabbit-slide-nishidayuya-2025-07-25-redmine_japan_vol4-redmine_meets_solid_queue
20
+
21
+ ### 表示
22
+
23
+ rabbit rabbit-slide-nishidayuya-2025-07-25-redmine_japan_vol4-redmine_meets_solid_queue.gem
24
+
data/Rakefile ADDED
@@ -0,0 +1,17 @@
1
+ require "rabbit/task/slide"
2
+
3
+ # Edit ./config.yaml to customize meta data
4
+
5
+ spec = nil
6
+ Rabbit::Task::Slide.new do |task|
7
+ spec = task.spec
8
+ # spec.files += Dir.glob("doc/**/*.*")
9
+ # spec.files -= Dir.glob("private/**/*.*")
10
+ # spec.add_runtime_dependency("rabbit-theme-YOUR-THEME")
11
+ end
12
+
13
+ desc "Tag #{spec.version}"
14
+ task :tag do
15
+ sh("git", "tag", "-a", spec.version.to_s, "-m", "Publish #{spec.version}")
16
+ sh("git", "push", "--tags")
17
+ end
data/config.yaml ADDED
@@ -0,0 +1,26 @@
1
+ ---
2
+ id: 2025-07-25-redmine_japan_vol4-redmine_meets_solid_queue
3
+ base_name: redmine_meets_solid_queue
4
+ tags:
5
+ - redmine
6
+ - redminejapan
7
+ presentation_date: '2025-07-25'
8
+ presentation_start_time:
9
+ presentation_end_time:
10
+ version: 2025.7.25.0
11
+ licenses:
12
+ - CC-BY-4.0
13
+ slideshare_id:
14
+ speaker_deck_id:
15
+ vimeo_id:
16
+ youtube_id:
17
+ width: 1368
18
+ height: 768
19
+ source_code_uri:
20
+ author:
21
+ markup_language: :markdown
22
+ name: Yuya.Nishida.
23
+ email:
24
+ rubygems_user: nishidayuya
25
+ slideshare_user:
26
+ speaker_deck_user: nishidayuya
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,140 @@
1
+ # Redmine × Solid Queue: 安心簡単キュー構成
2
+
3
+ author
4
+ : 西田雄也
5
+
6
+ date
7
+ : 2025-07-25
8
+ REDMINE JAPAN vol.4
9
+
10
+ allotted-time
11
+ : 7m
12
+
13
+ theme
14
+ : local_theme
15
+
16
+ start-time
17
+ : 2025-07-25
18
+
19
+ end-time
20
+ : 2025-07-25
21
+
22
+ # 背景: キューアダプター
23
+
24
+ - https://www.redmine.org/projects/redmine/wiki/RedmineInstall#Queues-adapter より,
25
+
26
+ ```
27
+ Redmine uses ActiveJob::QueueAdapters::AsyncAdapter
28
+ as default queue adapter which is not recommended
29
+ for production environment. Recommended adapter is
30
+ Sidekiq which uses Redis for persistance.
31
+ ```
32
+
33
+ - RedmineはAsyncAdapterをデフォルトのキューアダプターとして使うが,本番環境では推奨しない.
34
+ - 推奨するアダプターはRedisを永続化に使うSidekiqである.
35
+
36
+ # 背景: どういうことか
37
+
38
+ - Redmineはチケットの追加や更新をメイル通知するのにデフォルトではキューアダプターにAsyncAdapterを使っている.
39
+ - AsyncAdapterはスレッドベースのため,Redmineが終了するとそのジョブが失われる.具体的にはメイルが失われる.
40
+
41
+ ![](images/async_queue_adapter.png){:relative_height='30'}
42
+
43
+
44
+
45
+ - 実運用の設定例としてジョブの保存先にRedisを使うSidekiqAdapterの設定がredmine.orgで紹介されている.
46
+
47
+ # 背景: キューアダプターあれこれ
48
+
49
+ - RDBMSをバックエンドにするキューアダプター: DelayedJob, GoodJob, Solid Queue
50
+ - RDBMSで済むならSidekiqと違ってRedisが不要になる
51
+ - ただしパフォーマンス面はRedisの方が良い
52
+ - Rails 8からSolid Queueがデフォルトのキューアダプターになった
53
+
54
+
55
+
56
+ - Redmineでも使って楽しよう!
57
+
58
+ # 手順: 準備
59
+
60
+ 1. Gemfile.localに`gem "solid_queue"`
61
+ 1. 実行: `bundle && bin/rails solid_queue:install`
62
+ 1. db/migrate/年月日時分秒_add_solid_queue_tables.rbにdb/queue_schema.rbの内容を書く
63
+ - 楽するためにシングルデータベースにしてます
64
+ 1. 実行: `bin/rails db:migrate`
65
+ 1. config/additional_environment.rbに`config.active_job.queue_adapter = :solid_queue`
66
+
67
+ # 手順: ジョブ処理プロセス実行
68
+
69
+ - 以下のようにしてスーパーバイザー(ジョブ処理のためのもろもろのプロセス実行するもの)起動
70
+
71
+ ```console
72
+ $ bin/jobs start
73
+ ```
74
+
75
+ - Pumaを使っている場合はRedmine起動時に合わせて起動することも可能
76
+
77
+ ```ruby
78
+ # config/puma.rb
79
+ plugin :solid_queue
80
+ ```
81
+
82
+ # できた
83
+
84
+ ![](images/solid_queue_adapter.png){:relative_height='100'}
85
+
86
+ # めでたしめでたし
87
+
88
+ # 手順多い
89
+
90
+ # もっと簡単にできないのか?
91
+
92
+ # そうだ
93
+
94
+ # 我らがRedmineは
95
+
96
+ # プラグイン機能がある
97
+
98
+ # ということで
99
+
100
+ # プラグインを書きました
101
+
102
+ - redmine_solid_queueプラグインを入れて,
103
+
104
+ ```console
105
+ $ git clone \
106
+ https://github.com/nishidayuya/redmine_solid_queue \
107
+ plugins/redmine_solid_queue &&
108
+ bin/rails redmine:plugins
109
+ ```
110
+
111
+ - スーパーバイザーを起動するだけ
112
+
113
+ ```console
114
+ $ plugins/redmine_solid_queue/bin/jobs start
115
+ ```
116
+
117
+ - Pumaを使っている場合は↑も不要という親切設計
118
+ - 別ノードにしたいから余計なお世話な場合は環境変数でdisable
119
+
120
+ # まとめ
121
+
122
+ - Solid Queueは安心簡単
123
+ - メイル通知の頻度によってはこれだけで十分
124
+ - ↓のプラグインを使えば2コマンド実行だけで導入可能
125
+ - https://github.com/nishidayuya/redmine_solid_queue
126
+
127
+ ![](images/qrcode_github.com.png){:relative_height='130'}
128
+
129
+ # 時間が余ったら
130
+
131
+ # 自己紹介: 西田雄也 @nishidayuya
132
+
133
+ - ネットワーク応用通信研究所所属プログラマ
134
+ - 作ったことがあるRedmineプラグイン
135
+ - redmine_text_format_converter: TextileからMarkdownへ変換
136
+ - redmine_ruby_wasm: Redmine上でRubyのコードを実行
137
+ - The Never Deleting Story a.k.a. 絶対削除させないマン
138
+ - redmine_solid_queue (new!)
139
+
140
+ ![](images/qrcode_github.com.png){:height='230'}
metadata ADDED
@@ -0,0 +1,64 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rabbit-slide-nishidayuya-2025-07-25-redmine_japan_vol4-redmine_meets_solid_queue
3
+ version: !ruby/object:Gem::Version
4
+ version: 2025.7.25.0
5
+ platform: ruby
6
+ authors:
7
+ - Yuya.Nishida.
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: rabbit
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: 2.0.2
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - ">="
24
+ - !ruby/object:Gem::Version
25
+ version: 2.0.2
26
+ description: 2025-07-25に開催された[REDMINE JAPAN vol.4](https://redmine-japan.org/vol-4/time-table/#a07-3)の発表資料
27
+ email:
28
+ -
29
+ executables: []
30
+ extensions: []
31
+ extra_rdoc_files: []
32
+ files:
33
+ - ".rabbit"
34
+ - README.md
35
+ - Rakefile
36
+ - config.yaml
37
+ - images/async_queue_adapter.png
38
+ - images/async_queue_adapter_all.png
39
+ - images/qrcode_github.com.png
40
+ - images/solid_queue_adapter.png
41
+ - pdf/2025-07-25-redmine_japan_vol4-redmine_meets_solid_queue-redmine_meets_solid_queue.pdf
42
+ - redmine_meets_solid_queue.md
43
+ homepage: https://slide.rabbit-shocker.org/authors/nishidayuya/2025-07-25-redmine_japan_vol4-redmine_meets_solid_queue/
44
+ licenses:
45
+ - CC-BY-4.0
46
+ metadata: {}
47
+ rdoc_options: []
48
+ require_paths:
49
+ - lib
50
+ required_ruby_version: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ required_rubygems_version: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ requirements: []
61
+ rubygems_version: 3.6.9
62
+ specification_version: 4
63
+ summary: 'Redmine × Solid Queue: 安心簡単キュー構成'
64
+ test_files: []