sidekiq-unique-jobs 7.1.0 → 7.1.1

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: e47af152a018a49730a81e9f77ad68debea6a82d1750c6f41e8375be664da2bc
4
- data.tar.gz: 3bbb5a4fdb354b6c49e774e26c525b8a5678e83d4a1deb156d544522e76ecf3e
3
+ metadata.gz: 386c133d27bc902bc97772205b891514a584f1a7958792ae48a89bdac755ffd1
4
+ data.tar.gz: 345c7dd35ffbb29cb1d36367b8bedc7b15209e11fc1a1a6acc0e4f53d6e04a90
5
5
  SHA512:
6
- metadata.gz: 0c4d4c979b44940d230d3ad0f3df7487f223b2545aae90eca00eddf0b05fb450fe21beb924929aa40c53bb012fa01cd82e0e611136048370c33baea0375bb184
7
- data.tar.gz: 289cbba203cde12c4c070057fd642843d036f12f4623c70ecd3e9c5a777f12f416ea567e971512a86fe8556df4e03316b726f1320096655d0c54ada469758f94
6
+ metadata.gz: ab84fe40faa41b69d9b0d2f29aac64f98faf12c0ef15586f4423b4230e4d679dd74cde25afc4cd01614eb5ef1b1d7adb3a37bca28afd8fffe734d78d91f4fcae
7
+ data.tar.gz: d163b0d67fd5a6b433b352fcffdf14455ea9c8ef5b04942cea9e8024adf15583669c289c37c47f5e41a624cf3a7cf13235e09866dce997f1220a3a6521e9d787
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [v7.1.0](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.1.0) (2021-06-29)
4
+
5
+ [Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.0.12...v7.1.0)
6
+
7
+ **Implemented enhancements:**
8
+
9
+ - Reflections [\#611](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/611) ([mhenrixon](https://github.com/mhenrixon))
10
+ - Start new orphan reaper process if orphan reaper is not running [\#604](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/604) ([Assa1121](https://github.com/Assa1121))
11
+
12
+ **Fixed bugs:**
13
+
14
+ - Fix numerous small issues with locking [\#616](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/616) ([mhenrixon](https://github.com/mhenrixon))
15
+ - Allow locksmith delete to work with strings [\#615](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/615) ([pinkahd](https://github.com/pinkahd))
16
+
3
17
  ## [v7.0.12](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.0.12) (2021-06-04)
4
18
 
5
19
  [Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.0.11...v7.0.12)
@@ -82,7 +82,7 @@ module SidekiqUniqueJobs
82
82
  # @return [true,fakse]
83
83
  #
84
84
  def wait_for_lock?
85
- timeout && (timeout.zero? || timeout.positive?)
85
+ timeout.nil? || timeout.positive?
86
86
  end
87
87
 
88
88
  #
@@ -271,18 +271,21 @@ module SidekiqUniqueJobs
271
271
  # @return [String] a previously enqueued token (now taken off the queue)
272
272
  #
273
273
  def pop_queued(conn, wait = nil)
274
- if wait || config.wait_for_lock?
275
- brpoplpush(conn, wait)
276
- else
274
+ wait ||= config.timeout if config.wait_for_lock?
275
+
276
+ if wait.nil?
277
277
  rpoplpush(conn)
278
+ else
279
+ brpoplpush(conn, wait)
278
280
  end
279
281
  end
280
282
 
281
283
  #
282
284
  # @api private
283
285
  #
284
- def brpoplpush(conn, wait = nil)
285
- wait ||= config.timeout
286
+ def brpoplpush(conn, wait)
287
+ raise InvalidArgument, "wait must be an integer" unless wait.is_a?(Integer)
288
+
286
289
  # passing timeout 0 to brpoplpush causes it to block indefinitely
287
290
  conn.brpoplpush(key.queued, key.primed, timeout: wait)
288
291
  end
@@ -3,5 +3,5 @@
3
3
  module SidekiqUniqueJobs
4
4
  #
5
5
  # @return [String] the current SidekiqUniqueJobs version
6
- VERSION = "7.1.0"
6
+ VERSION = "7.1.1"
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.0
4
+ version: 7.1.1
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-06-29 00:00:00.000000000 Z
11
+ date: 2021-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: brpoplpush-redis_script
@@ -261,7 +261,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
261
261
  - !ruby/object:Gem::Version
262
262
  version: '0'
263
263
  requirements: []
264
- rubygems_version: 3.2.21
264
+ rubygems_version: 3.2.6
265
265
  signing_key:
266
266
  specification_version: 4
267
267
  summary: Sidekiq middleware that prevents duplicates jobs