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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b360fae82f2428f0a6c2d390b6320291bc34da86cb6670e858d902ea111751cc
4
- data.tar.gz: c9668d930a39b39635317451a21bd560bb971aa2eecfad6f6aeabbc5559cda1d
3
+ metadata.gz: 636522bb794fcb282d02d8f0978f25764dea0c0eb07a80886d88be4212094529
4
+ data.tar.gz: 875231fe2ef546537ab6d152366c2555d664ca79951a4a1af563a78b7cd6efe8
5
5
  SHA512:
6
- metadata.gz: 60540d8412247eae7dc99328eb77a79ad18dccc4fe83345b4abfb1bf4e3aa4e9fe713a49b6c2adaa5b081122471d95e88898cf19f5c97914a84f04fdfa259a11
7
- data.tar.gz: c5c5c92b36675ce1567cbbba76839ba9466ac03fdd53000947d611f9f8a3a68df6cafca6909d947c3c367839014cdc61e5fd8a45c7f5c3e5ac114a811aa69828
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
- conn.zrevrange(digests.key, 0, -1).each_with_object([]) do |digest, memo|
59
- next if belongs_to_job?(digest)
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
- memo << digest
62
- break memo if memo.size >= reaper_count
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
@@ -3,5 +3,5 @@
3
3
  module SidekiqUniqueJobs
4
4
  #
5
5
  # @return [String] the current SidekiqUniqueJobs version
6
- VERSION = "7.1.11"
6
+ VERSION = "7.1.12"
7
7
  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.11
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-30 00:00:00.000000000 Z
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