good_job 3.15.6 → 3.15.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a7428e5e751cae734ce33eecb6a9fc9a4e05bfd3c1774e6d0b6755785b1e33e7
4
- data.tar.gz: d753e31cb938aa8fcd5bd1e6a0737022b883b76d734796d4212989f6de987bfe
3
+ metadata.gz: 304066b93c2dc8d6960e51727ee9f9453e79b00793721ffe97d1df02b79eda44
4
+ data.tar.gz: '02598cf6b47e27a1d568bb0680d7d4af205fac6bc817953bd26b938a79db25eb'
5
5
  SHA512:
6
- metadata.gz: a0bb1f2322318db6be15c5a47ca88b063eb6f1f4a4981a9f78799c531d0f47beb888628e8216f22a7ca51873684cff93062a3d9e7e7da52cac186cca10da841a
7
- data.tar.gz: 9e9b91b4e904115033d0daf2aaf7583ba757f318a9f9eb36a005d2ae692e2796abfecea45b2ed4754ecdff218dd86854b6b9ddd8ebb21762a8786621b0d554ae
6
+ metadata.gz: d3107c75571854f143429417d9fe23227da47fdafbb025ea037a6b31094266cfec62da1bbe78525aa29472704568ad5f71f23bf031794fe2cbe6d214f0dea16a
7
+ data.tar.gz: '09743b81235c7795f217165f5a64a41132dcd8b0ccf969835dadd143ebb2992b88c3f8650677f089d152e53591e28a09634cb8f4a9e668fc78fc63ee0563cf4a'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
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
+
3
20
  ## [v3.15.6](https://github.com/bensheldon/good_job/tree/v3.15.6) (2023-04-24)
4
21
 
5
22
  [Full Changelog](https://github.com/bensheldon/good_job/compare/v3.15.5...v3.15.6)
@@ -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),
@@ -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.6'
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.6
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