sidekiq-unique-jobs 7.1.11 → 7.1.12
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 +27 -0
- data/lib/sidekiq_unique_jobs/orphans/ruby_reaper.rb +21 -5
- data/lib/sidekiq_unique_jobs/version.rb +1 -1
- 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: 636522bb794fcb282d02d8f0978f25764dea0c0eb07a80886d88be4212094529
|
4
|
+
data.tar.gz: 875231fe2ef546537ab6d152366c2555d664ca79951a4a1af563a78b7cd6efe8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db7884313d19f561be0ee68327f1068647123919450d72eee8ddba504d8105d16fa72b4930f990cc5904cea742b4307731ebdec6baeb00dc15e4271c9d8ab7d4
|
7
|
+
data.tar.gz: 923268a0919c0787ee835399c1a1b01e5a98b0c103cf59faf9361bc218fa7f19a5a2f13ed84b751588f25a7ea682bae67c36c0f0e8e5a7a90b3598b4bcac82dc
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,32 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v7.1.11](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.1.11) (2021-11-30)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.1.10...v7.1.11)
|
6
|
+
|
7
|
+
**Fixed bugs:**
|
8
|
+
|
9
|
+
- Fix ruby reaper edge case [\#661](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/661) ([mhenrixon](https://github.com/mhenrixon))
|
10
|
+
|
11
|
+
**Closed issues:**
|
12
|
+
|
13
|
+
- Question: Wait instead of cancelling if it is executing? [\#655](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/655)
|
14
|
+
- Expired Locks remain in zset of digests \[using "until\_expired" lock\] [\#653](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/653)
|
15
|
+
- \[Q&A\] Performance & Dead Locks [\#652](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/652)
|
16
|
+
- Sidekiq 6.3.0 includes Job module that clashes with sidekiq\_unique\_ext.rb class Job [\#651](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/651)
|
17
|
+
|
18
|
+
## [v7.1.10](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.1.10) (2021-10-18)
|
19
|
+
|
20
|
+
[Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.1.8...v7.1.10)
|
21
|
+
|
22
|
+
**Fixed bugs:**
|
23
|
+
|
24
|
+
- "IndexError: string not matched" when job is replaced on client [\#635](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/635)
|
25
|
+
|
26
|
+
**Merged pull requests:**
|
27
|
+
|
28
|
+
- Update URL for Sidekiq's Enterprise unique jobs [\#648](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/648) ([jsantos](https://github.com/jsantos))
|
29
|
+
|
3
30
|
## [v7.1.8](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.1.8) (2021-10-08)
|
4
31
|
|
5
32
|
[Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.0.13...v7.1.8)
|
@@ -9,6 +9,7 @@ module SidekiqUniqueJobs
|
|
9
9
|
#
|
10
10
|
# @author Mikael Henriksson <mikael@mhenrixon.com>
|
11
11
|
#
|
12
|
+
# rubocop:disable Metrics/ClassLength
|
12
13
|
class RubyReaper < Reaper
|
13
14
|
#
|
14
15
|
# @return [String] the suffix for :RUN locks
|
@@ -54,13 +55,27 @@ module SidekiqUniqueJobs
|
|
54
55
|
#
|
55
56
|
# @return [Array<String>] an array of orphaned digests
|
56
57
|
#
|
57
|
-
def orphans
|
58
|
-
|
59
|
-
|
58
|
+
def orphans # rubocop:disable Metrics/MethodLength
|
59
|
+
page = 0
|
60
|
+
per = reaper_count * 2
|
61
|
+
orphans = []
|
62
|
+
results = conn.zrange(digests.key, page * per, (page + 1) * per)
|
60
63
|
|
61
|
-
|
62
|
-
|
64
|
+
while results.size.positive?
|
65
|
+
results.each do |digest|
|
66
|
+
next if belongs_to_job?(digest)
|
67
|
+
|
68
|
+
orphans << digest
|
69
|
+
break if orphans.size >= reaper_count
|
70
|
+
end
|
71
|
+
|
72
|
+
break if orphans.size >= reaper_count
|
73
|
+
|
74
|
+
page += 1
|
75
|
+
results = conn.zrange(digests.key, page * per, (page + 1) * per)
|
63
76
|
end
|
77
|
+
|
78
|
+
orphans
|
64
79
|
end
|
65
80
|
|
66
81
|
#
|
@@ -211,5 +226,6 @@ module SidekiqUniqueJobs
|
|
211
226
|
conn.zscan_each(key, match: "*#{digest}*", count: 1).to_a.any?
|
212
227
|
end
|
213
228
|
end
|
229
|
+
# rubocop:enable Metrics/ClassLength
|
214
230
|
end
|
215
231
|
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: 7.1.
|
4
|
+
version: 7.1.12
|
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-
|
11
|
+
date: 2021-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: brpoplpush-redis_script
|