sidekiq-unique-jobs 6.0.0.rc1 → 6.0.0.rc2

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: 2df5975505fc4b3764d2cdd9dd64ecc9f3be6c553d88c3a15c7c5393acc6c4a0
4
- data.tar.gz: ad888ea1fc3c717c91975b79f5105d186384b21b534e96ce2a13b474e0b5201b
3
+ metadata.gz: 8ee36e00cd0663929ce027ef233084358ec02d6ab4dc26146fa716e22eab22ed
4
+ data.tar.gz: 05abdd365d0655d1df25a80c54d4530f62fb049a4c10bbe1c39a6e855902f8a2
5
5
  SHA512:
6
- metadata.gz: a7161efd989f5c27e95a9a3f0b7943b245ed4448e7584f568210ed81fc0ef2f816750c34336e38e612c73486d6749935907c3ff3931c2530f871e0b406339e36
7
- data.tar.gz: 17d7880b7856baee9e474b68c57edab8966e7f16599b0c08250949996d46ef5f22e665a32e625f3b69be03687beb1f63f30ee24662e9f26b9e43904e7a6e23fd
6
+ metadata.gz: ad6188cf8bdba50eee4e1c4fbb71c64e937e9452c5f4f4dabfebe141fadc53c28e63241d5cc1f6e45fa6d10aadedc735ce4d48a0ccec94e8c6609609bd7d3bb7
7
+ data.tar.gz: 464b147ec401b9d85f842ef4243d60a54b1e254a6a14487534be6a81d1e9d05ef399b2f42ea9721035eadd92c27b19ecfc61ce4df2f37277cec6f3fb7cb0dfc5
data/CHANGELOG.md CHANGED
@@ -10,6 +10,7 @@
10
10
  - Renamed `UntilTimeout` to `UntilExpired`
11
11
  - Removed concurrency for now (a0cff5bc42edbe7190d6ede7e7f845074d2d7af6)
12
12
  - Improved integration testing for locks
13
+ - Totally delete the hash that was growing out of proportion
13
14
 
14
15
  ## v5.1.0
15
16
 
data/README.md CHANGED
@@ -151,25 +151,6 @@ All that is required is that you specifically set the sidekiq option for *unique
151
151
  sidekiq_options unique: :while_executing
152
152
  ```
153
153
 
154
- For jobs scheduled in the future it is possible to set for how long the job
155
- should be unique. The job will be unique for the number of seconds configured (default 30 minutes)
156
- or until the job has been completed. Thus, the job will be unique for the shorter of the two. Note that Sidekiq versions before 3.0 will remove job keys after an hour, which means jobs can remain unique for at most an hour.
157
-
158
- If you want the unique job to stick around even after it has been successfully
159
- processed then just set `unique: :until_expired`.
160
-
161
- You can also control the `lock_expiration` of the uniqueness check. If you want to enforce uniqueness over a longer period than the default of 30 minutes then you can pass the number of seconds you want to use to the sidekiq options:
162
-
163
- ```ruby
164
- sidekiq_options unique: :until_expired, lock_expiration: 120 * 60 # 2 hours
165
- ```
166
-
167
- For locking modes (`:while_executing` and `:until_and_while_executing`) you can control the expiration length of the runtime uniqueness. If you want to enforce uniqueness over a longer period than the default of 60 seconds, then you can pass the number of seconds you want to use to the sidekiq options:
168
-
169
- ```ruby
170
- sidekiq_options unique: :while_executing, lock_expiration: 2 * 60 # 2 minutes
171
- ```
172
-
173
154
  Requiring the gem in your gemfile should be sufficient to enable unique jobs.
174
155
 
175
156
  ### Finer Control over Uniqueness
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SidekiqUniqueJobs
4
- VERSION = '6.0.0.rc1'
4
+ VERSION = '6.0.0.rc2'
5
5
  end
data/redis/delete.lua CHANGED
@@ -2,10 +2,11 @@ local exists_key = KEYS[1]
2
2
  local grabbed_key = KEYS[2]
3
3
  local available_key = KEYS[3]
4
4
  local version_key = KEYS[4]
5
- local unique_digest = KEYS[5] -- TODO: Legacy support (Remove in v6.1)
5
+ local unique_digest = KEYS[5] -- TODO: Legacy support (Remove in v6.1)
6
6
 
7
7
  redis.call('DEL', exists_key)
8
8
  redis.call('DEL', grabbed_key)
9
9
  redis.call('DEL', available_key)
10
10
  redis.call('DEL', version_key)
11
- redis.call('DEL', unique_digest) -- TODO: Legacy support (Remove in v6.1)
11
+ redis.call('DEL', 'uniquejobs') -- TODO: Old job hash, just drop the darn thing
12
+ redis.call('DEL', unique_digest) -- TODO: Legacy support (Remove in v6.1)
@@ -5,7 +5,7 @@ local stored_jid = redis.pcall('get', unique_key)
5
5
  if stored_jid then
6
6
  if stored_jid == job_id or stored_jid == '2' then
7
7
  redis.pcall('del', unique_key)
8
- redis.pcall('hdel', 'uniquejobs', job_id)
8
+ redis.pcall('HDEL', 'uniquejobs', job_id)
9
9
  return 1
10
10
  else
11
11
  return 0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-unique-jobs
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0.rc1
4
+ version: 6.0.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikael Henriksson