sidekiq-unique-jobs 7.0.0.beta20 → 7.0.0.beta21

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eb9187151e279ce0c7d654c62b86c57d3ae6ba21639206050943b72032df9f03
4
- data.tar.gz: 54aaf4e5179a445ebc551705a68ea177c7cc16c29f5e06d3d8287a683176c58b
3
+ metadata.gz: aa60dc35cfa347f88d50dd3b115e0313c88f150368a5052eec648f1e136c4e4e
4
+ data.tar.gz: 708a1f4191b7ec2f0a07129ce6abc8528908c2289c66cf55e9142c93b661e603
5
5
  SHA512:
6
- metadata.gz: 7c0c34048dd03e862038d92f2b092b03102593899f1c9b30f290dc8ef6a960b67b7583ae82e84d40d69cc001eff1342bb4c7092abfdb6269e8bc8adae2752c79
7
- data.tar.gz: 22ea78f67d06a986f3accc92799d83f1c18cba92d4ca2f2a1cebb386d902f6f4105bcd52e4a4235388748c95edca0efa7befe622ed24d25ab509ad4281bc9ced
6
+ metadata.gz: a097632a78d20a8ad3aaaf98819b18274a962965be59e3a0b3d0bd0208c47410dfc98bfd370007b35454d7a2ac3699374244d63fad3f11f549dde16998e542fc
7
+ data.tar.gz: beaa24b58dc8844aa689e108d2529f29b1390745df99687ab074e6822dad4cabb72402ae132b32307c4753551b70a5d44d1f0f475a6f64cb39a2405ecb4e9ff2
@@ -1,13 +1,17 @@
1
1
  # Changelog
2
2
 
3
- ## [Unreleased](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/HEAD)
3
+ ## [v7.0.0.beta20](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.0.beta20) (2020-06-02)
4
4
 
5
- [Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.0.0.beta19...HEAD)
5
+ [Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.0.0.beta19...v7.0.0.beta20)
6
6
 
7
7
  **Fixed bugs:**
8
8
 
9
9
  - Reaper can't be registered again if sidekiq gets killed by SIGKILL [\#490](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/490)
10
10
 
11
+ **Closed issues:**
12
+
13
+ - How do I turn this on for only one job class? [\#510](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/510)
14
+
11
15
  ## [v7.0.0.beta19](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.0.beta19) (2020-05-21)
12
16
 
13
17
  [Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.0.0.beta18...v7.0.0.beta19)
@@ -32,16 +36,13 @@
32
36
 
33
37
  - Try GitHub actions [\#505](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/505) ([mhenrixon](https://github.com/mhenrixon))
34
38
 
35
- **Fixed bugs:**
36
-
37
- - Deep stringify worker options to account for hash in on\_conflict [\#506](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/506) ([jasonbekolay](https://github.com/jasonbekolay))
38
-
39
39
  ## [v7.0.0.beta16](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.0.beta16) (2020-05-19)
40
40
 
41
41
  [Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v6.0.22...v7.0.0.beta16)
42
42
 
43
43
  **Fixed bugs:**
44
44
 
45
+ - Deep stringify worker options to account for hash in on\_conflict [\#506](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/506) ([jasonbekolay](https://github.com/jasonbekolay))
45
46
  - Deprecate configuration options with `default\_` [\#504](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/504) ([mhenrixon](https://github.com/mhenrixon))
46
47
  - Fix access to both server and client conflict [\#503](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/503) ([mhenrixon](https://github.com/mhenrixon))
47
48
 
@@ -1242,6 +1243,7 @@
1242
1243
  - Clarify README about unique expiration [\#36](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/36) ([spacemunkay](https://github.com/spacemunkay))
1243
1244
  - Add option to make jobs unique on all queues [\#32](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/32) ([robinmessage](https://github.com/robinmessage))
1244
1245
  - Fix homepage in gemspec [\#29](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/29) ([tmaier](https://github.com/tmaier))
1246
+ - Compatibility with Sidekiq 2.12.1 Scheduled Jobs [\#16](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/16) ([lsimoneau](https://github.com/lsimoneau))
1245
1247
 
1246
1248
  ## [v2.7.0](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v2.7.0) (2013-11-24)
1247
1249
 
@@ -1260,7 +1262,6 @@
1260
1262
  - Make unlock/yield order configurable. [\#21](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/21) ([endofunky](https://github.com/endofunky))
1261
1263
  - Rely on Sidekiq's String\#constantize extension instead of rolling our own [\#19](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/19) ([disbelief](https://github.com/disbelief))
1262
1264
  - Attempt to constantize String `worker\_class` arguments passed to client middleware [\#17](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/17) ([disbelief](https://github.com/disbelief))
1263
- - Compatibility with Sidekiq 2.12.1 Scheduled Jobs [\#16](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/16) ([lsimoneau](https://github.com/lsimoneau))
1264
1265
  - Allow worker to specify which arguments to include in uniquing hash [\#12](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/12) ([sax](https://github.com/sax))
1265
1266
  - Add support for unique when using Sidekiq's delay function [\#11](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/11) ([eduardosasso](https://github.com/eduardosasso))
1266
1267
  - Adding the unique prefix option [\#8](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/8) ([KensoDev](https://github.com/KensoDev))
@@ -40,7 +40,7 @@ module SidekiqUniqueJobs
40
40
  options[:count] = count if count
41
41
 
42
42
  redis do |conn|
43
- conn.zscan_each(key, options).to_a.map { |entry| load_json(entry[0]) }
43
+ conn.zscan_each(key, **options).to_a.map { |entry| load_json(entry[0]) }
44
44
  end
45
45
  end
46
46
 
@@ -80,7 +80,7 @@ module SidekiqUniqueJobs
80
80
  options[:match] = pattern
81
81
  options[:count] = count if count
82
82
 
83
- result = redis { |conn| conn.zscan_each(key, options).to_a }
83
+ result = redis { |conn| conn.zscan_each(key, **options).to_a }
84
84
 
85
85
  result.each_with_object({}) do |entry, hash|
86
86
  hash[entry[0]] = entry[1]
@@ -157,6 +157,8 @@ module SidekiqUniqueJobs
157
157
  entries = conn.lrange(queue_key, range_start, range_end)
158
158
  page += 1
159
159
 
160
+ break if entries.empty?
161
+
160
162
  entries.each do |entry|
161
163
  yield entry
162
164
  end
@@ -46,7 +46,13 @@ module SidekiqUniqueJobs
46
46
  # @return [false] when not exists
47
47
  #
48
48
  def exist?
49
- redis { |conn| conn.exists(key) }
49
+ redis do |conn|
50
+ value = conn.exists(key)
51
+ return true if value.is_a?(TrueClass)
52
+ return false if value.is_a?(FalseClass)
53
+
54
+ value.positive?
55
+ end
50
56
  end
51
57
 
52
58
  #
@@ -126,7 +126,7 @@ module SidekiqUniqueJobs
126
126
  def batch_scan(match:, count:)
127
127
  cursor = "0"
128
128
  loop do
129
- cursor, values = conn.scan(cursor, match: match, per: count)
129
+ cursor, values = conn.scan(cursor, match: match, count: count)
130
130
  yield values
131
131
  break if cursor == "0"
132
132
  end
@@ -3,5 +3,5 @@
3
3
  module SidekiqUniqueJobs
4
4
  #
5
5
  # @return [String] the current SidekiqUniqueJobs version
6
- VERSION = "7.0.0.beta20"
6
+ VERSION = "7.0.0.beta21"
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.0.0.beta20
4
+ version: 7.0.0.beta21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikael Henriksson
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-02 00:00:00.000000000 Z
11
+ date: 2020-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: brpoplpush-redis_script
@@ -90,158 +90,6 @@ dependencies:
90
90
  - - "<"
91
91
  - !ruby/object:Gem::Version
92
92
  version: '2.0'
93
- - !ruby/object:Gem::Dependency
94
- name: bundler
95
- requirement: !ruby/object:Gem::Requirement
96
- requirements:
97
- - - "~>"
98
- - !ruby/object:Gem::Version
99
- version: '2.1'
100
- type: :development
101
- prerelease: false
102
- version_requirements: !ruby/object:Gem::Requirement
103
- requirements:
104
- - - "~>"
105
- - !ruby/object:Gem::Version
106
- version: '2.1'
107
- - !ruby/object:Gem::Dependency
108
- name: rack-test
109
- requirement: !ruby/object:Gem::Requirement
110
- requirements:
111
- - - ">="
112
- - !ruby/object:Gem::Version
113
- version: '1.0'
114
- - - "<"
115
- - !ruby/object:Gem::Version
116
- version: '2.0'
117
- type: :development
118
- prerelease: false
119
- version_requirements: !ruby/object:Gem::Requirement
120
- requirements:
121
- - - ">="
122
- - !ruby/object:Gem::Version
123
- version: '1.0'
124
- - - "<"
125
- - !ruby/object:Gem::Version
126
- version: '2.0'
127
- - !ruby/object:Gem::Dependency
128
- name: rake
129
- requirement: !ruby/object:Gem::Requirement
130
- requirements:
131
- - - "~>"
132
- - !ruby/object:Gem::Version
133
- version: '13.0'
134
- type: :development
135
- prerelease: false
136
- version_requirements: !ruby/object:Gem::Requirement
137
- requirements:
138
- - - "~>"
139
- - !ruby/object:Gem::Version
140
- version: '13.0'
141
- - !ruby/object:Gem::Dependency
142
- name: rspec
143
- requirement: !ruby/object:Gem::Requirement
144
- requirements:
145
- - - "~>"
146
- - !ruby/object:Gem::Version
147
- version: '3.9'
148
- type: :development
149
- prerelease: false
150
- version_requirements: !ruby/object:Gem::Requirement
151
- requirements:
152
- - - "~>"
153
- - !ruby/object:Gem::Version
154
- version: '3.9'
155
- - !ruby/object:Gem::Dependency
156
- name: sinatra
157
- requirement: !ruby/object:Gem::Requirement
158
- requirements:
159
- - - ">="
160
- - !ruby/object:Gem::Version
161
- version: '2.0'
162
- - - "<"
163
- - !ruby/object:Gem::Version
164
- version: '3.0'
165
- type: :development
166
- prerelease: false
167
- version_requirements: !ruby/object:Gem::Requirement
168
- requirements:
169
- - - ">="
170
- - !ruby/object:Gem::Version
171
- version: '2.0'
172
- - - "<"
173
- - !ruby/object:Gem::Version
174
- version: '3.0'
175
- - !ruby/object:Gem::Dependency
176
- name: timecop
177
- requirement: !ruby/object:Gem::Requirement
178
- requirements:
179
- - - "~>"
180
- - !ruby/object:Gem::Version
181
- version: '0.9'
182
- type: :development
183
- prerelease: false
184
- version_requirements: !ruby/object:Gem::Requirement
185
- requirements:
186
- - - "~>"
187
- - !ruby/object:Gem::Version
188
- version: '0.9'
189
- - !ruby/object:Gem::Dependency
190
- name: github-markup
191
- requirement: !ruby/object:Gem::Requirement
192
- requirements:
193
- - - "~>"
194
- - !ruby/object:Gem::Version
195
- version: '3.0'
196
- type: :development
197
- prerelease: false
198
- version_requirements: !ruby/object:Gem::Requirement
199
- requirements:
200
- - - "~>"
201
- - !ruby/object:Gem::Version
202
- version: '3.0'
203
- - !ruby/object:Gem::Dependency
204
- name: github_changelog_generator
205
- requirement: !ruby/object:Gem::Requirement
206
- requirements:
207
- - - "~>"
208
- - !ruby/object:Gem::Version
209
- version: '1.14'
210
- type: :development
211
- prerelease: false
212
- version_requirements: !ruby/object:Gem::Requirement
213
- requirements:
214
- - - "~>"
215
- - !ruby/object:Gem::Version
216
- version: '1.14'
217
- - !ruby/object:Gem::Dependency
218
- name: yard
219
- requirement: !ruby/object:Gem::Requirement
220
- requirements:
221
- - - "~>"
222
- - !ruby/object:Gem::Version
223
- version: 0.9.18
224
- type: :development
225
- prerelease: false
226
- version_requirements: !ruby/object:Gem::Requirement
227
- requirements:
228
- - - "~>"
229
- - !ruby/object:Gem::Version
230
- version: 0.9.18
231
- - !ruby/object:Gem::Dependency
232
- name: gem-release
233
- requirement: !ruby/object:Gem::Requirement
234
- requirements:
235
- - - "~>"
236
- - !ruby/object:Gem::Version
237
- version: '2.0'
238
- type: :development
239
- prerelease: false
240
- version_requirements: !ruby/object:Gem::Requirement
241
- requirements:
242
- - - "~>"
243
- - !ruby/object:Gem::Version
244
- version: '2.0'
245
93
  description: |
246
94
  Prevents simultaneous Sidekiq jobs with the same unique arguments to run.
247
95
  Highly configurable to suite your specific needs.
@@ -391,8 +239,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
391
239
  - !ruby/object:Gem::Version
392
240
  version: 1.3.1
393
241
  requirements: []
394
- rubygems_version: 3.1.2
395
- signing_key:
242
+ rubygems_version: 3.1.4
243
+ signing_key:
396
244
  specification_version: 4
397
245
  summary: Sidekiq middleware that prevents duplicates jobs
398
246
  test_files: []