redis/create.lua in sidekiq-unique-jobs-6.0.0.rc6 vs redis/create.lua in sidekiq-unique-jobs-6.0.0.rc7

- old
+ new

@@ -2,11 +2,12 @@ local exists_key = KEYS[1] local grabbed_key = KEYS[2] local available_key = KEYS[3] local version_key = KEYS[4] -local unique_digest = KEYS[5] +local unique_keys = KEYS[5] +local unique_digest = KEYS[6] local job_id = ARGV[1] local expiration = tonumber(ARGV[2]) local api_version = ARGV[3] local concurrency = tonumber(ARGV[4]) @@ -27,10 +28,11 @@ return old_token end end ---------------------------------------------------------------- -redis.call('EXPIRE', exists_key, 10) +redis.call('SADD', unique_keys, unique_digest) +redis.call('EXPIRE', exists_key, 5) redis.call('DEL', grabbed_key) redis.call('DEL', available_key) if concurrency and concurrency > 1 then for index = 1, concurrency do