good_job 3.15.6 → 3.15.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/app/models/good_job/base_record.rb +1 -1
- data/app/models/good_job/execution.rb +1 -1
- data/app/models/good_job/lockable.rb +2 -0
- data/lib/good_job/configuration.rb +6 -6
- data/lib/good_job/version.rb +4 -1
- data/lib/good_job.rb +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 304066b93c2dc8d6960e51727ee9f9453e79b00793721ffe97d1df02b79eda44
|
4
|
+
data.tar.gz: '02598cf6b47e27a1d568bb0680d7d4af205fac6bc817953bd26b938a79db25eb'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
data/lib/good_job/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2023-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activejob
|