good_job 3.15.6 → 3.15.8

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: a7428e5e751cae734ce33eecb6a9fc9a4e05bfd3c1774e6d0b6755785b1e33e7
4
- data.tar.gz: d753e31cb938aa8fcd5bd1e6a0737022b883b76d734796d4212989f6de987bfe
3
+ metadata.gz: 49215c024094f667286ca6d15541b8b3d7c046e3f78155a0533e8941e75d2cf9
4
+ data.tar.gz: 89520dcc01d3a2ffd023077f8e0ba049c9e55f39fc5cfddd1babb70bf7b716a9
5
5
  SHA512:
6
- metadata.gz: a0bb1f2322318db6be15c5a47ca88b063eb6f1f4a4981a9f78799c531d0f47beb888628e8216f22a7ca51873684cff93062a3d9e7e7da52cac186cca10da841a
7
- data.tar.gz: 9e9b91b4e904115033d0daf2aaf7583ba757f318a9f9eb36a005d2ae692e2796abfecea45b2ed4754ecdff218dd86854b6b9ddd8ebb21762a8786621b0d554ae
6
+ metadata.gz: ed47837b028707b3f6660aba678f0e20a475c2fa56144eedf06edd70c186c1ba08ea8223fd388840c58a6fa2cec75ffb322c386aa93f18ab086ee1ded58e48fb
7
+ data.tar.gz: 75b05c5abf5cee0a87634371a91c838c86b336c4dcde84d205b6b86748e2e0123b6719d001f78d18d08fd1e8b5f0e96d1a1155e42d7943c9c730697724396bce
data/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # Changelog
2
2
 
3
+ ## [v3.15.8](https://github.com/bensheldon/good_job/tree/v3.15.8) (2023-05-19)
4
+
5
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v3.15.7...v3.15.8)
6
+
7
+ **Closed issues:**
8
+
9
+ - `active_job.enqueue` Performance Issue [\#939](https://github.com/bensheldon/good_job/issues/939)
10
+
11
+ **Merged pull requests:**
12
+
13
+ - Fix hard-coded and duplicated table\_name [\#958](https://github.com/bensheldon/good_job/pull/958) ([gap777](https://github.com/gap777))
14
+ - Bump rubocop from 1.46.0 to 1.50.2 [\#949](https://github.com/bensheldon/good_job/pull/949) ([dependabot[bot]](https://github.com/apps/dependabot))
15
+ - Bump rubocop-rails from 2.18.0 to 2.19.1 [\#947](https://github.com/bensheldon/good_job/pull/947) ([dependabot[bot]](https://github.com/apps/dependabot))
16
+
17
+ ## [v3.15.7](https://github.com/bensheldon/good_job/tree/v3.15.7) (2023-04-30)
18
+
19
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v3.15.6...v3.15.7)
20
+
21
+ **Fixed bugs:**
22
+
23
+ - 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))
24
+
25
+ **Closed issues:**
26
+
27
+ - Issue with performing jobs that use ActionMailer::Parameterized [\#944](https://github.com/bensheldon/good_job/issues/944)
28
+ - Deprecation warning on the deprecation warning [\#943](https://github.com/bensheldon/good_job/issues/943)
29
+
30
+ **Merged pull requests:**
31
+
32
+ - Replace class usage of ActiveSupport::Deprecator with gem-specific instance [\#945](https://github.com/bensheldon/good_job/pull/945) ([bensheldon](https://github.com/bensheldon))
33
+
3
34
  ## [v3.15.6](https://github.com/bensheldon/good_job/tree/v3.15.6) (2023-04-24)
4
35
 
5
36
  [Full Changelog](https://github.com/bensheldon/good_job/compare/v3.15.5...v3.15.6)
@@ -35,7 +35,7 @@ module GoodJob
35
35
  end
36
36
 
37
37
  def discrete_support?
38
- if connection.table_exists?('good_job_executions')
38
+ if connection.table_exists?(DiscreteExecution.table_name)
39
39
  true
40
40
  else
41
41
  migration_pending_warning!
@@ -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.8'
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.8
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-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activejob