Sha256: 56b1b8ef28b31df2ca3eead8e07e00d02cef08f1fb64edfdb6c2a5cb841546de

Contents?: true

Size: 1.37 KB

Versions: 49

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

49 entries across 49 versions & 1 rubygems

Version Path
sidekiq-unique-jobs-7.1.13 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.1.12 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.1.11 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.1.10 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.1.8 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.0.13 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.1.7 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.1.6 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.1.5 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.1.3 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.1.2 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.1.1 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.1.0 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.0.12 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.0.11 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.0.10 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.0.9 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.0.8 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.0.7 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua
sidekiq-unique-jobs-7.0.6 lib/sidekiq_unique_jobs/lua/delete_by_digest.lua