sidekiq-unique-jobs 3.0.8 → 3.0.9
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.
Potentially problematic release.
This version of sidekiq-unique-jobs might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +1 -0
- data/lib/sidekiq-unique-jobs.rb +9 -0
- data/lib/sidekiq_unique_jobs/middleware/client/strategies/unique.rb +1 -1
- data/lib/sidekiq_unique_jobs/middleware/client/unique_jobs.rb +1 -10
- data/lib/sidekiq_unique_jobs/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3313bf28559e24e82c4205b30ac7857e6e062ad6
|
4
|
+
data.tar.gz: 7ee635aefdadfeef42d11099a824cee0575b1870
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a9181ebb1fa33d9d8ffd23f43258d8059d40436af6ccecc29641b6c9c9a6397f5a9d81c3516e51a58e55867812902084cdd35f8d60bf61b0d1b49a7e60f1eeb
|
7
|
+
data.tar.gz: f9ebbe34af83fa6b9340942babd0a6f4deca947bf9b33c84c09d9da2a37dbc10899f31d9c41e074abf483903e30defc1dc981f8c25da6ab48d181ddd75aed6f8
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## v3.0.8
|
2
|
+
- Unique extensions for Web GUI by @rickenharp. Uniqueness will now be removed when a job is.
|
3
|
+
|
4
|
+
## v3.0.7
|
5
|
+
- Internal refactoring
|
6
|
+
- Improved coverage
|
7
|
+
- Rubocop style validation
|
8
|
+
|
1
9
|
## v3.0.5
|
2
10
|
- Fixed the different test modes (major thanks to @salrepe)
|
3
11
|
|
data/README.md
CHANGED
@@ -107,6 +107,7 @@ SidekiqUniqueJobs uses mock_redis for inline testing. Due to complaints about ha
|
|
107
107
|
## Contributors
|
108
108
|
|
109
109
|
- https://github.com/salrepe
|
110
|
+
- https://github.com/rickenharp
|
110
111
|
- https://github.com/sax
|
111
112
|
- https://github.com/eduardosasso
|
112
113
|
- https://github.com/KensoDev
|
data/lib/sidekiq-unique-jobs.rb
CHANGED
@@ -25,4 +25,13 @@ module SidekiqUniqueJobs
|
|
25
25
|
def configure
|
26
26
|
yield configuration
|
27
27
|
end
|
28
|
+
|
29
|
+
# Attempt to constantize a string worker_class argument, always
|
30
|
+
# failing back to the original argument.
|
31
|
+
def worker_class_constantize(worker_class)
|
32
|
+
return worker_class unless worker_class.is_a?(String)
|
33
|
+
worker_class.constantize
|
34
|
+
rescue NameError
|
35
|
+
worker_class
|
36
|
+
end
|
28
37
|
end
|
@@ -15,7 +15,7 @@ module SidekiqUniqueJobs
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def initialize(worker_class, item, queue, redis_pool = nil)
|
18
|
-
@worker_class = worker_class
|
18
|
+
@worker_class = SidekiqUniqueJobs.worker_class_constantize(worker_class)
|
19
19
|
@item = item
|
20
20
|
@queue = queue
|
21
21
|
@redis_pool = redis_pool
|
@@ -13,7 +13,7 @@ module SidekiqUniqueJobs
|
|
13
13
|
attr_reader :item, :worker_class, :redis_pool
|
14
14
|
|
15
15
|
def call(worker_class, item, queue, redis_pool = nil)
|
16
|
-
@worker_class = worker_class_constantize(worker_class)
|
16
|
+
@worker_class = SidekiqUniqueJobs.worker_class_constantize(worker_class)
|
17
17
|
@item = item
|
18
18
|
@redis_pool = redis_pool
|
19
19
|
|
@@ -33,15 +33,6 @@ module SidekiqUniqueJobs
|
|
33
33
|
def strategy
|
34
34
|
STRATEGIES.detect(&:elegible?)
|
35
35
|
end
|
36
|
-
|
37
|
-
# Attempt to constantize a string worker_class argument, always
|
38
|
-
# failing back to the original argument.
|
39
|
-
def worker_class_constantize(worker_class)
|
40
|
-
return worker_class unless worker_class.is_a?(String)
|
41
|
-
worker_class.constantize
|
42
|
-
rescue NameError
|
43
|
-
worker_class
|
44
|
-
end
|
45
36
|
end
|
46
37
|
end
|
47
38
|
end
|
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: 3.0.
|
4
|
+
version: 3.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikael Henriksson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sidekiq
|