sidekiq-unique-jobs 7.0.10 → 7.0.11
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of sidekiq-unique-jobs might be problematic. Click here for more details.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8bf67dee2b01934cc8d2402a9662d7b1048ec75c2ca7ac76c5ec00ac1e07ffe
|
4
|
+
data.tar.gz: bca38efcab9618fc146707ad4530a53cbe2983ae07a31fe923a9f9c8afc1415a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2edc9978a36bb106b610d708489b620b79443075a2c7e240154674d59574c5e0a5654cf9883ea6d9dc35aca6ba41ccf8ac3c1a566dbbcb767eb375b1dc41b85
|
7
|
+
data.tar.gz: de60d4517653af2d64d23f2fcc17f8a757e0239d86f379a6b6f87db12aaaf299b144a75895468859118a28230a5f1f1f880182cf6a89981fdcae08b9f3d17b84
|
data/CHANGELOG.md
CHANGED
@@ -2,7 +2,27 @@
|
|
2
2
|
|
3
3
|
## [Unreleased](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/HEAD)
|
4
4
|
|
5
|
-
[Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.0.
|
5
|
+
[Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.0.10...HEAD)
|
6
|
+
|
7
|
+
**Closed issues:**
|
8
|
+
|
9
|
+
- Timed out after 0s while waiting for primed token [\#601](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/601)
|
10
|
+
|
11
|
+
## [v7.0.10](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.10) (2021-05-10)
|
12
|
+
|
13
|
+
[Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.0.9...v7.0.10)
|
14
|
+
|
15
|
+
**Fixed bugs:**
|
16
|
+
|
17
|
+
- Add drift to original value [\#603](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/603) ([mhenrixon](https://github.com/mhenrixon))
|
18
|
+
|
19
|
+
**Closed issues:**
|
20
|
+
|
21
|
+
- Nested Sidekiq jobs are not kicked off with until\_and\_while\_executing [\#600](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/600)
|
22
|
+
|
23
|
+
## [v7.0.9](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.9) (2021-04-26)
|
24
|
+
|
25
|
+
[Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.0.8...v7.0.9)
|
6
26
|
|
7
27
|
**Fixed bugs:**
|
8
28
|
|
@@ -58,7 +58,7 @@ module SidekiqUniqueJobs
|
|
58
58
|
|
59
59
|
def initialize(job_hash = {})
|
60
60
|
@type = job_hash[LOCK]&.to_sym
|
61
|
-
@worker = SidekiqUniqueJobs.
|
61
|
+
@worker = SidekiqUniqueJobs.safe_constantize(job_hash[CLASS])
|
62
62
|
@limit = job_hash.fetch(LOCK_LIMIT, 1)
|
63
63
|
@timeout = job_hash.fetch(LOCK_TIMEOUT, 0)
|
64
64
|
@ttl = job_hash.fetch(LOCK_TTL) { job_hash.fetch(LOCK_EXPIRATION, nil) }.to_i
|
@@ -4,7 +4,7 @@
|
|
4
4
|
# Contains configuration and utility methods that belongs top level
|
5
5
|
#
|
6
6
|
# @author Mikael Henriksson <mikael@mhenrixon.com>
|
7
|
-
module SidekiqUniqueJobs
|
7
|
+
module SidekiqUniqueJobs # rubocop:disable Metrics/ModuleLength
|
8
8
|
include SidekiqUniqueJobs::Connection
|
9
9
|
extend SidekiqUniqueJobs::JSON
|
10
10
|
|
@@ -255,4 +255,19 @@ module SidekiqUniqueJobs
|
|
255
255
|
constant.const_get(name, false)
|
256
256
|
end
|
257
257
|
end
|
258
|
+
|
259
|
+
# Attempt to constantize a string worker_class argument, always
|
260
|
+
# failing back to the original argument when the constant can't be found
|
261
|
+
#
|
262
|
+
# @return [Sidekiq::Worker, String]
|
263
|
+
def safe_constantize(str)
|
264
|
+
constantize(str)
|
265
|
+
rescue NameError => ex
|
266
|
+
case ex.message
|
267
|
+
when /uninitialized constant/
|
268
|
+
str
|
269
|
+
else
|
270
|
+
raise
|
271
|
+
end
|
272
|
+
end
|
258
273
|
end
|
@@ -49,14 +49,7 @@ module SidekiqUniqueJobs
|
|
49
49
|
#
|
50
50
|
# @return [Sidekiq::Worker]
|
51
51
|
def worker_class_constantize(klazz = @worker_class)
|
52
|
-
SidekiqUniqueJobs.
|
53
|
-
rescue NameError => ex
|
54
|
-
case ex.message
|
55
|
-
when /uninitialized constant/
|
56
|
-
klazz
|
57
|
-
else
|
58
|
-
raise
|
59
|
-
end
|
52
|
+
SidekiqUniqueJobs.safe_constantize(klazz)
|
60
53
|
end
|
61
54
|
|
62
55
|
#
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-unique-jobs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.0.
|
4
|
+
version: 7.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikael Henriksson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-05-
|
11
|
+
date: 2021-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: brpoplpush-redis_script
|
@@ -257,7 +257,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
257
257
|
- !ruby/object:Gem::Version
|
258
258
|
version: '0'
|
259
259
|
requirements: []
|
260
|
-
rubygems_version: 3.2.
|
260
|
+
rubygems_version: 3.2.6
|
261
261
|
signing_key:
|
262
262
|
specification_version: 4
|
263
263
|
summary: Sidekiq middleware that prevents duplicates jobs
|