Sha256: ab8b3d647226eb1eb3c1958c9ff9642a2059eba1cffbff9f50673968171b35bb

Contents?: true

Size: 1.37 KB

Versions: 22

Compression:

Stored size: 1.37 KB

Contents

-------- BEGIN keys ---------
local digest     = KEYS[1]
local queued     = KEYS[2]
local primed     = KEYS[3]
local locked     = KEYS[4]
local run_digest = KEYS[5]
local run_queued = KEYS[6]
local run_primed = KEYS[7]
local run_locked = KEYS[8]
local digests    = KEYS[9]
--------  END keys  ---------

--------  BEGIN injected arguments --------
local current_time = tonumber(ARGV[1])
local debug_lua    = ARGV[2] == "true"
local max_history  = tonumber(ARGV[3])
local script_name  = tostring(ARGV[4]) .. ".lua"
local redisversion = tostring(ARGV[5])
---------  END injected arguments ---------

--------  BEGIN local functions --------
<%= include_partial "shared/_common.lua" %>
----------  END local functions ----------

--------  BEGIN delete_by_digest.lua --------
local counter       = 0
local redis_version = toversion(redisversion)
local del_cmd   = "DEL"

log_debug("BEGIN delete_by_digest:", digest)

if redis_version["major"] >= 4 then del_cmd = "UNLINK"; end

log_debug(del_cmd, digest, queued, primed, locked, run_digest, run_queued, run_primed, run_locked)
counter = redis.call(del_cmd, digest, queued, primed, locked, run_digest, run_queued, run_primed, run_locked)

log_debug("ZREM", digests, digest)
redis.call("ZREM", digests, digest)

log_debug("END delete_by_digest:", digest, "(deleted " ..  counter .. " keys)")
return counter
--------   END delete_by_digest.lua  --------

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
sidekiq-unique-jobs-7.0.0.beta26 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.0.0.beta25 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.0.0.beta24 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.0.0.beta23 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.0.0.beta22 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.0.0.beta21 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.0.0.beta20 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.0.0.beta19 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.0.0.beta18 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.0.0.beta17 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.0.0.beta16 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.0.0.beta15 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.0.0.beta14 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.0.0.beta13 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.0.0.beta12 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.0.0.beta11 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.0.0.beta10 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.0.0.beta9 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.0.0.beta8 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.0.0.beta7 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua