redis/create.lua in sidekiq-unique-jobs-6.0.0.rc2 vs redis/create.lua in sidekiq-unique-jobs-6.0.0.rc3

- old
+ new

@@ -10,27 +10,21 @@ local expiration = tonumber(ARGV[2]) local api_version = ARGV[3] local concurrency = tonumber(ARGV[4]) local stored_token = redis.call('GETSET', exists_key, job_id) - -redis.log(redis.LOG_DEBUG, "create.lua - starting...") - if stored_token then - redis.log(redis.LOG_DEBUG, "create.lua - stored_token: " .. stored_token) return stored_token end ---------------------------------------------------------------- -- TODO: Legacy support (Remove in v6.1) local old_token = redis.call('GET', unique_digest) if old_token then - -- redis.log(redis.LOG_DEBUG, "create.lua - " .. unique_digest .. " with " .. old_token) if old_token == job_id or old_token == '2' then - -- redis.log(redis.LOG_DEBUG, "create.lua - " .. unique_digest .. " with " .. old_token .. " MATCH with " .. job_id) + -- No need to return, we just delete the old key redis.call('DEL', unique_digest) else - -- redis.log(redis.LOG_DEBUG, "create.lua - " .. unique_digest .. " with " .. old_token .. " MISMATCH with " .. job_id) return old_token end end ----------------------------------------------------------------