sidekiq-unique-jobs 7.0.0.beta5 → 7.0.0.beta6
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 +4 -4
- data/CHANGELOG.md +40 -0
- data/README.md +23 -1
- data/lib/sidekiq_unique_jobs/sidekiq_worker_methods.rb +2 -1
- data/lib/sidekiq_unique_jobs/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 711e186f6270655ef3eda5dabc758dd7dfb20fe9f0d3b2bcb99b229d8aeb5ce1
|
4
|
+
data.tar.gz: a2b7d5187b51c8f25f6ff2c6eb34d0f2cecc54b750eaabacb1e86f67495f369d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56ffc41a041fa16dddc6f0cc2861b39c3a8ce3e0d017e8af17f4b10980f6d1bd0e21c56fdd6726c9d23616e11920c45bf85224c035e26e12440e0258d670c882
|
7
|
+
data.tar.gz: c05723254f974feb76920cf6a90226eef8b2e742e0496f056728a74da389f96741a7fecde817fd16bb3b4a491a39896077b545f352d57acbcd7d0bc61403fd23
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,45 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v7.0.0.beta5](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.0.beta5) (2019-11-26)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v6.0.17...v7.0.0.beta5)
|
6
|
+
|
7
|
+
**Implemented enhancements:**
|
8
|
+
|
9
|
+
- Bump rails [\#450](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/450) ([mhenrixon](https://github.com/mhenrixon))
|
10
|
+
- Rename myapp [\#449](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/449) ([mhenrixon](https://github.com/mhenrixon))
|
11
|
+
- Just to keep track of this [\#445](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/445) ([mhenrixon](https://github.com/mhenrixon))
|
12
|
+
|
13
|
+
**Fixed bugs:**
|
14
|
+
|
15
|
+
- Prevent multiple reapers [\#453](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/453) ([mhenrixon](https://github.com/mhenrixon))
|
16
|
+
- Make deletion compatible with redis-namespace [\#452](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/452) ([mhenrixon](https://github.com/mhenrixon))
|
17
|
+
- Make sure server process stays locked [\#448](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/448) ([mhenrixon](https://github.com/mhenrixon))
|
18
|
+
|
19
|
+
**Closed issues:**
|
20
|
+
|
21
|
+
- Deletion of digest doesn't work from admin UI [\#438](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/438)
|
22
|
+
|
23
|
+
**Merged pull requests:**
|
24
|
+
|
25
|
+
- Bump gems [\#446](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/446) ([mhenrixon](https://github.com/mhenrixon))
|
26
|
+
|
27
|
+
## [v6.0.17](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v6.0.17) (2019-11-26)
|
28
|
+
|
29
|
+
[Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v6.0.16...v6.0.17)
|
30
|
+
|
31
|
+
**Fixed bugs:**
|
32
|
+
|
33
|
+
- Allow redis namespace to work with deletion [\#451](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/451) ([mhenrixon](https://github.com/mhenrixon))
|
34
|
+
|
35
|
+
## [v6.0.16](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v6.0.16) (2019-11-25)
|
36
|
+
|
37
|
+
[Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.0.0.beta4...v6.0.16)
|
38
|
+
|
39
|
+
**Fixed bugs:**
|
40
|
+
|
41
|
+
- Ensure runtime locks are removed [\#447](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/447) ([mhenrixon](https://github.com/mhenrixon))
|
42
|
+
|
3
43
|
## [v7.0.0.beta4](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.0.beta4) (2019-11-25)
|
4
44
|
|
5
45
|
[Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.0.0.beta3...v7.0.0.beta4)
|
data/README.md
CHANGED
@@ -44,6 +44,8 @@
|
|
44
44
|
- [After Unlock Callback](#after-unlock-callback)
|
45
45
|
- [Logging](#logging)
|
46
46
|
- [Cleanup Dead Locks](#cleanup-dead-locks)
|
47
|
+
- [Other Sidekiq gems](#other-sidekiq-gems)
|
48
|
+
- [sidekiq-global_id](#sidekiq-global_id)
|
47
49
|
- [Debugging](#debugging)
|
48
50
|
- [Sidekiq Web](#sidekiq-web)
|
49
51
|
- [Show Locks](#show-locks)
|
@@ -613,12 +615,32 @@ Starting in v5.1, Sidekiq can also fire a global callback when a job dies:
|
|
613
615
|
# this goes in your initializer
|
614
616
|
Sidekiq.configure_server do |config|
|
615
617
|
config.death_handlers << ->(job, _ex) do
|
616
|
-
digest =
|
618
|
+
digest = job['unique_digest']
|
617
619
|
SidekiqUniqueJobs::Digests.delete_by_digest(digest) if digest
|
618
620
|
end
|
619
621
|
end
|
620
622
|
```
|
621
623
|
|
624
|
+
### Other Sidekiq gems
|
625
|
+
|
626
|
+
#### sidekiq-global_id
|
627
|
+
|
628
|
+
It was reported in [#235](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/235) that the order of the Sidekiq middleware needs to be as follows.
|
629
|
+
|
630
|
+
```ruby
|
631
|
+
Sidekiq.client_middleware do |chain|
|
632
|
+
chain.add Sidekiq::GlobalId::ClientMiddleware
|
633
|
+
chain.add SidekiqUniqueJobs::Middleware::Client
|
634
|
+
end
|
635
|
+
|
636
|
+
Sidekiq.server_middleware do |chain|
|
637
|
+
chain.add SidekiqUniqueJobs::Middleware::Server
|
638
|
+
chain.add Sidekiq::GlobalId::ServerMiddleware
|
639
|
+
end
|
640
|
+
```
|
641
|
+
|
642
|
+
For a working setup check the following [file](https://github.com/mhenrixon/sidekiq-unique-jobs/blob/945c4c4c517168d49e3f8ee952fcc9c430865635/myapp/config/initializers/sidekiq.rb#L8)
|
643
|
+
|
622
644
|
## Debugging
|
623
645
|
|
624
646
|
There are several ways of removing keys that are stuck. The prefered way is by using the unique extension to `Sidekiq::Web`. The old console and command line versions still work but might be deprecated in the future. It is better to search for the digest itself and delete the keys matching that digest.
|
@@ -43,7 +43,8 @@ module SidekiqUniqueJobs
|
|
43
43
|
#
|
44
44
|
# @return [Sidekiq::Worker]
|
45
45
|
def worker_class_constantize(klazz = @worker_class)
|
46
|
-
return klazz
|
46
|
+
return klazz.class if klazz.is_a?(Sidekiq::Worker) # sidekiq v6.x
|
47
|
+
return klazz unless klazz.is_a?(String)
|
47
48
|
|
48
49
|
Object.const_get(klazz)
|
49
50
|
rescue NameError => ex
|
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.0.
|
4
|
+
version: 7.0.0.beta6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikael Henriksson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-11-
|
11
|
+
date: 2019-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: brpoplpush-redis_script
|
@@ -371,7 +371,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
371
371
|
- !ruby/object:Gem::Version
|
372
372
|
version: 1.3.1
|
373
373
|
requirements: []
|
374
|
-
rubygems_version: 3.0.
|
374
|
+
rubygems_version: 3.0.3
|
375
375
|
signing_key:
|
376
376
|
specification_version: 4
|
377
377
|
summary: Sidekiq middleware that prevents duplicates jobs
|