good_job 3.15.5 → 3.15.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b856cbd922ea5a1972ec3d257cdcbc01a51384985b5e7fea5350d603f1629304
4
- data.tar.gz: 531885ab6153ff8b2dd0c7889cdce82950475cc9a786cdc67a1d61d1bd552806
3
+ metadata.gz: 304066b93c2dc8d6960e51727ee9f9453e79b00793721ffe97d1df02b79eda44
4
+ data.tar.gz: '02598cf6b47e27a1d568bb0680d7d4af205fac6bc817953bd26b938a79db25eb'
5
5
  SHA512:
6
- metadata.gz: 6770f8956dd3be246bff36f33196a5adeb12508c997d81e379c95be06036f5f028f875ee8d063ac9896613b92c6e10e5b508efaa05970427dafa08ccd23a9022
7
- data.tar.gz: 7b08baebc02bddc3b8969c56003e3f8c52e4d40e1974cbe46012ad6e5e8ff4a065e800d4cabda116c638e01b41952168bd3523ea83cf9979fbaec53b8bdbfd28
6
+ metadata.gz: d3107c75571854f143429417d9fe23227da47fdafbb025ea037a6b31094266cfec62da1bbe78525aa29472704568ad5f71f23bf031794fe2cbe6d214f0dea16a
7
+ data.tar.gz: '09743b81235c7795f217165f5a64a41132dcd8b0ccf969835dadd143ebb2992b88c3f8650677f089d152e53591e28a09634cb8f4a9e668fc78fc63ee0563cf4a'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # Changelog
2
2
 
3
+ ## [v3.15.7](https://github.com/bensheldon/good_job/tree/v3.15.7) (2023-04-30)
4
+
5
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v3.15.6...v3.15.7)
6
+
7
+ **Fixed bugs:**
8
+
9
+ - Fix Lockable's `SELECT 1 AS one` queries missing `LIMIT 1` [\#946](https://github.com/bensheldon/good_job/pull/946) ([bensheldon](https://github.com/bensheldon))
10
+
11
+ **Closed issues:**
12
+
13
+ - Issue with performing jobs that use ActionMailer::Parameterized [\#944](https://github.com/bensheldon/good_job/issues/944)
14
+ - Deprecation warning on the deprecation warning [\#943](https://github.com/bensheldon/good_job/issues/943)
15
+
16
+ **Merged pull requests:**
17
+
18
+ - Replace class usage of ActiveSupport::Deprecator with gem-specific instance [\#945](https://github.com/bensheldon/good_job/pull/945) ([bensheldon](https://github.com/bensheldon))
19
+
20
+ ## [v3.15.6](https://github.com/bensheldon/good_job/tree/v3.15.6) (2023-04-24)
21
+
22
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v3.15.5...v3.15.6)
23
+
24
+ **Merged pull requests:**
25
+
26
+ - Refine french translations [\#936](https://github.com/bensheldon/good_job/pull/936) ([francois-ferrandis](https://github.com/francois-ferrandis))
27
+ - feat: locales for ja [\#935](https://github.com/bensheldon/good_job/pull/935) ([aki77](https://github.com/aki77))
28
+
3
29
  ## [v3.15.5](https://github.com/bensheldon/good_job/tree/v3.15.5) (2023-04-24)
4
30
 
5
31
  [Full Changelog](https://github.com/bensheldon/good_job/compare/v3.15.4...v3.15.5)
@@ -8,7 +8,7 @@ module GoodJob
8
8
  self.abstract_class = true
9
9
 
10
10
  def self.migration_pending_warning!
11
- ActiveSupport::Deprecation.warn(<<~DEPRECATION)
11
+ GoodJob.deprecator.warn(<<~DEPRECATION)
12
12
  GoodJob has pending database migrations. To create the migration files, run:
13
13
  rails generate good_job:update
14
14
  To apply the migration files, run:
@@ -212,7 +212,7 @@ module GoodJob
212
212
  # Construct arguments for GoodJob::Execution from an ActiveJob instance.
213
213
  def self.enqueue_args(active_job, overrides = {})
214
214
  if active_job.priority && GoodJob.configuration.smaller_number_is_higher_priority.nil?
215
- ActiveSupport::Deprecation.warn(<<~DEPRECATION)
215
+ GoodJob.deprecator.warn(<<~DEPRECATION)
216
216
  The next major version of GoodJob (v4.0) will change job `priority` to give smaller numbers higher priority (default: `0`), in accordance with Active Job's definition of priority.
217
217
  To opt-in to this behavior now, set `config.good_job.smaller_number_is_higher_priority = true` in your GoodJob initializer or application.rb.
218
218
  To not opt-in yet, but silence this deprecation warning, set `config.good_job.smaller_number_is_higher_priority = false`.
@@ -324,6 +324,7 @@ module GoodJob
324
324
  AND pg_locks.objsubid = 1
325
325
  AND pg_locks.classid = ('x' || substr(md5($1::text), 1, 16))::bit(32)::int
326
326
  AND pg_locks.objid = (('x' || substr(md5($2::text), 1, 16))::bit(64) << 32)::bit(32)::int
327
+ LIMIT 1
327
328
  SQL
328
329
  binds = [
329
330
  ActiveRecord::Relation::QueryAttribute.new('key', key, ActiveRecord::Type::String.new),
@@ -351,6 +352,7 @@ module GoodJob
351
352
  AND pg_locks.classid = ('x' || substr(md5($1::text), 1, 16))::bit(32)::int
352
353
  AND pg_locks.objid = (('x' || substr(md5($2::text), 1, 16))::bit(64) << 32)::bit(32)::int
353
354
  AND pg_locks.pid = pg_backend_pid()
355
+ LIMIT 1
354
356
  SQL
355
357
  binds = [
356
358
  ActiveRecord::Relation::QueryAttribute.new('key', key, ActiveRecord::Type::String.new),
@@ -3,7 +3,7 @@ fr:
3
3
  good_job:
4
4
  actions:
5
5
  destroy: Détruire
6
- discard: Jeter
6
+ discard: Mettre au rebut
7
7
  inspect: Inspecter
8
8
  reschedule: Reprogrammer
9
9
  retry: Recommencez
@@ -14,26 +14,26 @@ fr:
14
14
  title: Lots
15
15
  jobs:
16
16
  actions:
17
- confirm_destroy: Êtes-vous sûr de vouloir détruire ce travail ?
18
- confirm_discard: Voulez-vous vraiment supprimer cette tâche ?
19
- confirm_reschedule: Êtes-vous sûr de vouloir reprogrammer ce travail ?
20
- confirm_retry: Êtes-vous sûr de vouloir réessayer ce travail ?
21
- destroy: Détruire le travail
22
- discard: Supprimer le travail
23
- reschedule: Replanifier le travail
24
- retry: Réessayer le travail
17
+ confirm_destroy: Voulez-vous vraiment détruire ce job ?
18
+ confirm_discard: Voulez-vous vraiment mettre au rebut ce job ?
19
+ confirm_reschedule: Voulez-vous vraiment replanifier ce job ?
20
+ confirm_retry: Voulez-vous vraiment réessayer ce job ?
21
+ destroy: Détruire le job
22
+ discard: Mettre au rebut le job
23
+ reschedule: Replanifier le job
24
+ retry: Réessayer le job
25
25
  title: Actions
26
- no_jobs_found: Aucun emploi trouvé.
26
+ no_jobs_found: Aucun job trouvé.
27
27
  show:
28
- attributes: Les attributs
29
- batched_jobs: Tâches groupées
30
- callback_jobs: Tâches de rappel
28
+ attributes: Attributs
29
+ batched_jobs: Jobs groupés
30
+ callback_jobs: Jobs de rappel
31
31
  table:
32
32
  no_batches_found: Aucun lot trouvé.
33
33
  cron_entries:
34
34
  actions:
35
35
  confirm_disable: Voulez-vous vraiment désactiver cette entrée cron ?
36
- confirm_enable: Voulez-vous vraiment confirmer cette entrée cron ?
36
+ confirm_enable: Voulez-vous vraiment activer cette entrée cron ?
37
37
  confirm_enqueue: Voulez-vous vraiment mettre en file d'attente cette entrée cron ?
38
38
  disable: Désactiver l'entrée cron
39
39
  enable: Activer l'entrée cron
@@ -46,7 +46,7 @@ fr:
46
46
  notice: L'entrée Cron a été mise en file d'attente.
47
47
  index:
48
48
  no_cron_schedules_found: Aucune planification cron trouvée.
49
- title: Horaires Cron
49
+ title: Entrées Cron
50
50
  pending_migrations: Nécessite une migration de la base de données GoodJob en attente.
51
51
  show:
52
52
  cron_entry_key: Clé d'entrée Cron
@@ -97,72 +97,72 @@ fr:
97
97
  seconds: "%{sec}s"
98
98
  helpers:
99
99
  relative_time:
100
- future: en %{time}
101
- past: Il y a %{time}
100
+ future: dans %{time}
101
+ past: il y a %{time}
102
102
  jobs:
103
103
  actions:
104
- confirm_destroy: Êtes-vous sûr de vouloir détruire le travail ?
105
- confirm_discard: Êtes-vous usure que vous voulez jeter le travail?
106
- confirm_reschedule: Êtes-vous sûr de vouloir replanifier le travail ?
107
- confirm_retry: Êtes-vous sûr de vouloir réessayer le travail ?
108
- destroy: Détruire le travail
109
- discard: Supprimer la tâche
110
- reschedule: Replanifier le travail
111
- retry: Réessayer la tâche
104
+ confirm_destroy: Voulez-vous vraiment détruire le job ?
105
+ confirm_discard: Voulez-vous vraiment mettre au rebut le job ?
106
+ confirm_reschedule: Voulez-vous vraiment replanifier le job ?
107
+ confirm_retry: Voulez-vous vraiment réessayer le job ?
108
+ destroy: Détruire le job
109
+ discard: Mettre au rebut le job
110
+ reschedule: Replanifier le job
111
+ retry: Réessayer le job
112
112
  destroy:
113
- notice: Le travail a été détruit
113
+ notice: Le job a été détruit
114
114
  discard:
115
- notice: Le travail a été supprimé
115
+ notice: Le job a été mis au rebut
116
116
  executions:
117
117
  error: Erreur
118
- in_queue: dans la queue
118
+ in_queue: Dans la file d'attente
119
119
  runtime: Durée
120
120
  title: Exécutions
121
121
  index:
122
- job_pagination: Pagination de l'emploi
123
- older_jobs: Emplois plus anciens
122
+ job_pagination: Pagination du job
123
+ older_jobs: Jobs plus anciens
124
124
  reschedule:
125
- notice: Le travail a été reprogrammé
125
+ notice: Le job a été replanifié
126
126
  retry:
127
- notice: Le travail a été réessayé
127
+ notice: Le job a été réessayé
128
128
  show:
129
- jobs: Emplois
129
+ jobs: Jobs
130
130
  table:
131
131
  actions:
132
132
  apply_to_all:
133
- one: Appliquer à tous les 1 travail.
134
- other: Appliquer à tous les %{count} travaux.
135
- confirm_destroy_all: Voulez-vous vraiment détruire les travaux sélectionnés ?
136
- confirm_discard_all: Êtes-vous usure que vous souhaitez supprimer les emplois sélectionnés?
137
- confirm_reschedule_all: Voulez-vous vraiment reprogrammer les tâches sélectionnées ?
138
- confirm_retry_all: Voulez-vous vraiment réessayer les tâches sélectionnées ?
139
- destroy_all: Détruisez tout
140
- discard_all: Jeter tout
141
- reschedule_all: Reprogrammer tout
133
+ one: Appliquer à ce job
134
+ other: Appliquer aux %{count} jobs
135
+ confirm_destroy_all: Voulez-vous vraiment détruire les jobs sélectionnés ?
136
+ confirm_discard_all: Voulez-vous vraiment mettre au rebut les jobs sélectionnés?
137
+ confirm_reschedule_all: Voulez-vous vraiment replanifier les jobs sélectionnées ?
138
+ confirm_retry_all: Voulez-vous vraiment réessayer les jobs sélectionnées ?
139
+ destroy_all: Tout détruire
140
+ discard_all: Tout mettre au rebut
141
+ reschedule_all: Tout replanifier
142
142
  retry_all: Tout réessayer
143
143
  title: Actions
144
- no_jobs_found: Aucun emploi trouvé.
145
- toggle_actions: Basculer les actions
146
- toggle_all_jobs: Basculer tous les travaux
144
+ no_jobs_found: Aucun job trouvé.
145
+ toggle_actions: Afficher / cacher les actions
146
+ toggle_all_jobs: Sélectionner tous les jobs
147
147
  models:
148
148
  batch:
149
149
  created: Créé
150
150
  created_at: Créé à
151
151
  discarded: Mis au rebut
152
- discarded_at: Jeté à
152
+ discarded_at: Mis au rebut à
153
153
  enqueued: En file d'attente
154
154
  enqueued_at: En file d'attente à
155
- finished: Fini
155
+ finished: Terminé
156
156
  finished_at: Terminé à
157
- jobs: Emplois
157
+ jobs: Jobs
158
158
  name: Nom
159
159
  cron:
160
160
  class: Classe
161
- last_run: Dernier tour
162
- next_scheduled: Prochain rendez-vous
163
- schedule: Calendrier
161
+ last_run: Dernière exécution
162
+ next_scheduled: Prochaine exécution
163
+ schedule: Planification
164
164
  job:
165
- arguments: Arguments
165
+ arguments: Paramètres
166
166
  attempts: Tentatives
167
167
  priority: Priorité
168
168
  queue: File d'attente
@@ -187,33 +187,33 @@ fr:
187
187
  index:
188
188
  no_good_job_processes_found: Aucun processus GoodJob trouvé.
189
189
  process: Processus
190
- schedulers: Planificateurs
191
- started: Commencé
190
+ schedulers: Schedulers
191
+ started: Lancé
192
192
  title: Processus
193
193
  shared:
194
194
  filter:
195
195
  all: Tous
196
- all_jobs: Tous les emplois
196
+ all_jobs: Tous les jobs
197
197
  all_queues: Toutes les files d'attente
198
198
  clear: Clair
199
- job_name: Nom du travail
200
- placeholder: Recherche par classe, ID de tâche, paramètres de tâche et texte d'erreur.
199
+ job_name: Nom du job
200
+ placeholder: Recherche par classe, ID de job, paramètres de job et texte d'erreur.
201
201
  queue_name: Nom de la file d'attente
202
202
  search: Recherche
203
203
  footer:
204
204
  last_update_html: Dernière mise à jour <time id="page-updated-at" datetime="%{time}">%{time}</time>
205
205
  wording: N'oublie pas, toi aussi tu fais du bon boulot !
206
206
  navbar:
207
- batches: Batches
207
+ batches: Lots
208
208
  cron_schedules: Cron
209
209
  jobs: Jobs
210
210
  live_poll: En direct
211
211
  name: "GoodJob 👍"
212
212
  processes: Processus
213
213
  status:
214
- discarded: Abandonnés
214
+ discarded: Mis au rebut
215
215
  queued: À la file
216
216
  retried: Réessayés
217
217
  running: En cours
218
- scheduled: Programmés
218
+ scheduled: Replanifiés
219
219
  succeeded: Réussis
@@ -0,0 +1,219 @@
1
+ ---
2
+ ja:
3
+ good_job:
4
+ actions:
5
+ destroy: 削除する
6
+ discard: 破棄する
7
+ inspect: 調査する
8
+ reschedule: 再スケジュールする
9
+ retry: 再試行する
10
+ batches:
11
+ index:
12
+ older_batches: より古いバッチ
13
+ pending_migrations: GoodJobに保留中のデータベースマイグレーションがあります。
14
+ title: バッチ
15
+ jobs:
16
+ actions:
17
+ confirm_destroy: このジョブを削除してもよろしいですか?
18
+ confirm_discard: このジョブを破棄してもよろしいですか?
19
+ confirm_reschedule: このジョブを再スケジュールしてもよろしいですか?
20
+ confirm_retry: このジョブを再試行してもよろしいですか?
21
+ destroy: ジョブを削除する
22
+ discard: ジョブを破棄する
23
+ reschedule: ジョブを再スケジュールする
24
+ retry: ジョブを再試行する
25
+ title: アクション
26
+ no_jobs_found: ジョブが見つかりませんでした。
27
+ show:
28
+ attributes: 属性
29
+ batched_jobs: バッチ処理されたジョブ
30
+ callback_jobs: コールバックジョブ
31
+ table:
32
+ no_batches_found: バッチが見つかりませんでした。
33
+ cron_entries:
34
+ actions:
35
+ confirm_disable: このcronエントリを無効化してもよろしいですか?
36
+ confirm_enable: このcronエントリを有効化してもよろしいですか?
37
+ confirm_enqueue: このcronエントリをキューに入れてもよろしいですか?
38
+ disable: cronエントリを無効化する
39
+ enable: cronエントリを有効化する
40
+ enqueue: cronエントリをすぐにキューに入れる
41
+ disable:
42
+ notice: cronエントリが無効化されました。
43
+ enable:
44
+ notice: cronエントリが有効化されました。
45
+ enqueue:
46
+ notice: cronエントリがキューに入れられました。
47
+ index:
48
+ no_cron_schedules_found: cronスケジュールが見つかりませんでした。
49
+ title: cronスケジュール
50
+ pending_migrations: GoodJobの保留中のデータベースマイグレーションが必要です。
51
+ show:
52
+ cron_entry_key: cronエントリキー
53
+ datetime:
54
+ distance_in_words:
55
+ about_x_hours:
56
+ one: 約1時間
57
+ other: 約%{count}時間
58
+ about_x_months:
59
+ one: 約1ヶ月
60
+ other: 約%{count}ヶ月
61
+ about_x_years:
62
+ one: 約1年
63
+ other: 約%{count}年
64
+ almost_x_years:
65
+ one: ほぼ1年
66
+ other: ほぼ%{count}年
67
+ half_a_minute: 半分ぐらい
68
+ less_than_x_minutes:
69
+ one: 1分未満
70
+ other: "%{count}分未満"
71
+ less_than_x_seconds:
72
+ one: 1秒未満
73
+ other: "%{count}秒未満"
74
+ over_x_years:
75
+ one: 1年以上
76
+ other: "%{count}年以上"
77
+ x_days:
78
+ one: 1日
79
+ other: "%{count}日"
80
+ x_minutes:
81
+ one: 1分
82
+ other: "%{count}分"
83
+ x_months:
84
+ one: 1ヶ月
85
+ other: "%{count}ヶ月"
86
+ x_seconds:
87
+ one: 1秒
88
+ other: "%{count}秒"
89
+ x_years:
90
+ one: 1年
91
+ other: "%{count}年"
92
+ duration:
93
+ hours: "%{hour}時間 %{min}分"
94
+ less_than_10_seconds: "%{sec}秒"
95
+ milliseconds: "%{ms}ミリ秒"
96
+ minutes: "%{min}分 %{sec}秒"
97
+ seconds: "%{sec}秒"
98
+ helpers:
99
+ relative_time:
100
+ future: "%{time}後"
101
+ past: "%{time}前"
102
+ jobs:
103
+ actions:
104
+ confirm_destroy: ジョブを削除してもよろしいですか?
105
+ confirm_discard: ジョブを破棄してもよろしいですか?
106
+ confirm_reschedule: ジョブを再スケジュールしてもよろしいですか?
107
+ confirm_retry: ジョブを再試行してもよろしいですか?
108
+ destroy: ジョブを削除
109
+ discard: ジョブを破棄
110
+ reschedule: ジョブを再スケジュール
111
+ retry: ジョブを再試行
112
+ destroy:
113
+ notice: ジョブが削除されました
114
+ discard:
115
+ notice: ジョブが破棄されました
116
+ executions:
117
+ error: エラー
118
+ in_queue: 待機中
119
+ runtime: 実行時間
120
+ title: 実行
121
+ index:
122
+ job_pagination: ジョブのページネーション
123
+ older_jobs: 古いジョブ
124
+ reschedule:
125
+ notice: ジョブが再スケジュールされました
126
+ retry:
127
+ notice: ジョブが再試行されました
128
+ show:
129
+ jobs: ジョブ
130
+ table:
131
+ actions:
132
+ apply_to_all:
133
+ one: すべての1つのジョブに適用する
134
+ other: すべての%{count}個のジョブに適用する
135
+ confirm_destroy_all: 選択したジョブをすべて削除してもよろしいですか?
136
+ confirm_discard_all: 選択したジョブをすべて破棄してもよろしいですか?
137
+ confirm_reschedule_all: 選択したジョブをすべて再スケジュールしてもよろしいですか?
138
+ confirm_retry_all: 選択したジョブをすべて再試行してもよろしいですか?
139
+ destroy_all: すべて削除
140
+ discard_all: すべて破棄
141
+ reschedule_all: すべて再スケジュール
142
+ retry_all: すべて再試行
143
+ title: アクション
144
+ no_jobs_found: ジョブが見つかりませんでした
145
+ toggle_actions: アクションを切り替える
146
+ toggle_all_jobs: すべてのジョブを切り替える
147
+ models:
148
+ batch:
149
+ created: 作成された
150
+ created_at: 作成日時
151
+ discarded: 破棄された
152
+ discarded_at: 破棄日時
153
+ enqueued: キューに追加された
154
+ enqueued_at: キューに追加された日時
155
+ finished: 終了した
156
+ finished_at: 終了日時
157
+ jobs: ジョブ
158
+ name: 名前
159
+ cron:
160
+ class: クラス
161
+ last_run: 前回実行日時
162
+ next_scheduled: 次回予定日時
163
+ schedule: スケジュール
164
+ job:
165
+ arguments: 引数
166
+ attempts: 試行回数
167
+ priority: 優先度
168
+ queue: キュー
169
+ number:
170
+ format:
171
+ delimiter: ","
172
+ separator: "."
173
+ human:
174
+ decimal_units:
175
+ delimiter: ","
176
+ format: "%n%u"
177
+ precision: 3
178
+ separator: "."
179
+ units:
180
+ billion: B
181
+ million: M
182
+ quadrillion: Q
183
+ thousand: K
184
+ trillion: T
185
+ unit: ''
186
+ processes:
187
+ index:
188
+ no_good_job_processes_found: GoodJobのプロセスが見つかりませんでした。
189
+ process: プロセス
190
+ schedulers: スケジューラー
191
+ started: 開始日時
192
+ title: プロセス
193
+ shared:
194
+ filter:
195
+ all: 全て
196
+ all_jobs: 全てのジョブ
197
+ all_queues: 全てのキュー
198
+ clear: クリア
199
+ job_name: ジョブ名
200
+ placeholder: クラス名、ジョブID、ジョブパラメータ、エラーテキストで検索
201
+ queue_name: キュー名
202
+ search: 検索
203
+ footer:
204
+ last_update_html: 最終更新 <time id="page-updated-at" datetime="%{time}">%{time}</time>
205
+ wording: Remember, you're doing a Good Job too!
206
+ navbar:
207
+ batches: バッチ
208
+ cron_schedules: Cron
209
+ jobs: ジョブ
210
+ live_poll: リアルタイム更新
211
+ name: "GoodJob 👍"
212
+ processes: プロセス
213
+ status:
214
+ discarded: 破棄済み
215
+ queued: 処理待ち
216
+ retried: 再試行済み
217
+ running: 実行中
218
+ scheduled: スケジュール待ち
219
+ succeeded: 成功済み
@@ -250,12 +250,12 @@ module GoodJob
250
250
  if rails_config.key?(:cleanup_interval_jobs)
251
251
  value = rails_config[:cleanup_interval_jobs]
252
252
  if value.nil?
253
- ActiveSupport::Deprecation.warn(
253
+ GoodJob.deprecator.warn(
254
254
  %(Setting `config.good_job.cleanup_interval_jobs` to `nil` will no longer disable count-based cleanups in GoodJob v4. Set to `false` to disable, or `-1` to run every time.)
255
255
  )
256
256
  value = false
257
257
  elsif value == 0 # rubocop:disable Style/NumericPredicate
258
- ActiveSupport::Deprecation.warn(
258
+ GoodJob.deprecator.warn(
259
259
  %(Setting `config.good_job.cleanup_interval_jobs` to `0` will disable count-based cleanups in GoodJob v4. Set to `false` to disable, or `-1` to run every time.)
260
260
  )
261
261
  value = -1
@@ -263,7 +263,7 @@ module GoodJob
263
263
  elsif env.key?('GOOD_JOB_CLEANUP_INTERVAL_JOBS')
264
264
  value = env['GOOD_JOB_CLEANUP_INTERVAL_JOBS']
265
265
  if value.blank?
266
- ActiveSupport::Deprecation.warn(
266
+ GoodJob.deprecator.warn(
267
267
  %(Setting `GOOD_JOB_CLEANUP_INTERVAL_JOBS` to `""` will no longer disable count-based cleanups in GoodJob v4. Set to `0` to disable, or `-1` to run every time.)
268
268
  )
269
269
  value = false
@@ -285,12 +285,12 @@ module GoodJob
285
285
  value = rails_config[:cleanup_interval_seconds]
286
286
 
287
287
  if value.nil?
288
- ActiveSupport::Deprecation.warn(
288
+ GoodJob.deprecator.warn(
289
289
  %(Setting `config.good_job.cleanup_interval_seconds` to `nil` will no longer disable time-based cleanups in GoodJob v4. Set to `false` to disable, or `-1` to run every time.)
290
290
  )
291
291
  value = false
292
292
  elsif value == 0 # rubocop:disable Style/NumericPredicate
293
- ActiveSupport::Deprecation.warn(
293
+ GoodJob.deprecator.warn(
294
294
  %(Setting `config.good_job.cleanup_interval_seconds` to `0` will disable time-based cleanups in GoodJob v4. Set to `false` to disable, or `-1` to run every time.)
295
295
  )
296
296
  value = -1
@@ -298,7 +298,7 @@ module GoodJob
298
298
  elsif env.key?('GOOD_JOB_CLEANUP_INTERVAL_SECONDS')
299
299
  value = env['GOOD_JOB_CLEANUP_INTERVAL_SECONDS']
300
300
  if value.blank?
301
- ActiveSupport::Deprecation.warn(
301
+ GoodJob.deprecator.warn(
302
302
  %(Setting `GOOD_JOB_CLEANUP_INTERVAL_SECONDS` to `""` will no longer disable time-based cleanups in GoodJob v4. Set to `0` to disable, or `-1` to run every time.)
303
303
  )
304
304
  value = false
@@ -1,5 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
  module GoodJob
3
3
  # GoodJob gem version.
4
- VERSION = '3.15.5'
4
+ VERSION = '3.15.7'
5
+
6
+ # GoodJob version as Gem::Version object
7
+ GEM_VERSION = Gem::Version.new(VERSION)
5
8
  end
data/lib/good_job.rb CHANGED
@@ -223,5 +223,14 @@ module GoodJob
223
223
  end
224
224
  end
225
225
 
226
+ # Deprecator for providing deprecation warnings.
227
+ # @return [ActiveSupport::Deprecation]
228
+ def self.deprecator
229
+ @_deprecator ||= begin
230
+ next_major_version = GEM_VERSION.segments[0] + 1
231
+ ActiveSupport::Deprecation.new("#{next_major_version}.0", "GoodJob")
232
+ end
233
+ end
234
+
226
235
  ActiveSupport.run_load_hooks(:good_job, self)
227
236
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: good_job
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.15.5
4
+ version: 3.15.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Sheldon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-24 00:00:00.000000000 Z
11
+ date: 2023-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activejob
@@ -390,6 +390,7 @@ files:
390
390
  - config/locales/en.yml
391
391
  - config/locales/es.yml
392
392
  - config/locales/fr.yml
393
+ - config/locales/ja.yml
393
394
  - config/locales/nl.yml
394
395
  - config/locales/ru.yml
395
396
  - config/locales/ua.yml