Sha256: c180be3e600961a911726a916c6c298feaa2c23047feafcc8c66199cdbbe3a41

Contents?: true

Size: 985 Bytes

Versions: 76

Compression:

Stored size: 985 Bytes

Contents

-------- BEGIN keys ---------
local digest    = KEYS[1]
local queued    = KEYS[2]
local primed    = KEYS[3]
local locked    = KEYS[4]
local info      = KEYS[5]
local changelog = KEYS[6]
local digests   = KEYS[7]
-------- END keys ---------

-------- BEGIN lock arguments ---------
local job_id = ARGV[1]
-------- END lock arguments -----------

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

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


--------  BEGIN locked.lua --------
if redis.call("HEXISTS", locked, job_id) == 1 then
  log_debug("Locked", digest, "job_id:", job_id)
  return 1
else
  log_debug("NOT Locked", digest, "job_id:", job_id)
  return -1
end
---------  END locked.lua ---------

Version data entries

76 entries across 76 versions & 1 rubygems

Version Path
sidekiq-unique-jobs-7.1.33 lib/sidekiq_unique_jobs/lua/locked.lua
sidekiq-unique-jobs-7.1.32 lib/sidekiq_unique_jobs/lua/locked.lua
sidekiq-unique-jobs-7.1.31 lib/sidekiq_unique_jobs/lua/locked.lua
sidekiq-unique-jobs-7.1.30 lib/sidekiq_unique_jobs/lua/locked.lua
sidekiq-unique-jobs-8.0.1 lib/sidekiq_unique_jobs/lua/locked.lua
sidekiq-unique-jobs-8.0.0 lib/sidekiq_unique_jobs/lua/locked.lua
sidekiq-unique-jobs-7.1.29 lib/sidekiq_unique_jobs/lua/locked.lua
sidekiq-unique-jobs-7.1.28 lib/sidekiq_unique_jobs/lua/locked.lua
sidekiq-unique-jobs-7.1.27 lib/sidekiq_unique_jobs/lua/locked.lua
sidekiq-unique-jobs-7.1.26 lib/sidekiq_unique_jobs/lua/locked.lua
sidekiq-unique-jobs-7.1.25 lib/sidekiq_unique_jobs/lua/locked.lua
sidekiq-unique-jobs-7.1.24 lib/sidekiq_unique_jobs/lua/locked.lua
sidekiq-unique-jobs-7.1.23 lib/sidekiq_unique_jobs/lua/locked.lua
sidekiq-unique-jobs-7.1.22 lib/sidekiq_unique_jobs/lua/locked.lua
sidekiq-unique-jobs-7.1.21 lib/sidekiq_unique_jobs/lua/locked.lua
sidekiq-unique-jobs-7.1.20 lib/sidekiq_unique_jobs/lua/locked.lua
sidekiq-unique-jobs-7.1.19 lib/sidekiq_unique_jobs/lua/locked.lua
sidekiq-unique-jobs-7.1.18 lib/sidekiq_unique_jobs/lua/locked.lua
sidekiq-unique-jobs-7.1.17 lib/sidekiq_unique_jobs/lua/locked.lua
sidekiq-unique-jobs-7.1.16 lib/sidekiq_unique_jobs/lua/locked.lua