Sha256: d461aabcda58a18b07dfa8352e3da508e565a94e5849d05fcd8864fe55bbf177

Contents?: true

Size: 1.05 KB

Versions: 76

Compression:

Stored size: 1.05 KB

Contents

-------- BEGIN keys ---------
local live_key = KEYS[1]
local dead_key = KEYS[2]
-------- END keys ---------

-------- BEGIN lock arguments ---------
local version  = 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 set_version.lua --------
log_debug("BEGIN setting version:", version)

local updated     = false
local old_version = redis.call("GETSET", live_key, version)

if not old_version then
  log_debug("No previous version found")
  updated = true
elseif old_version ~= version then
  log_debug("Old version:", old_version, "differs from:", version)
  redis.call("SET", dead_key, old_version)
  updated = true
end

return updated
--------  END delete.lua --------


Version data entries

76 entries across 76 versions & 1 rubygems

Version Path
sidekiq-unique-jobs-7.0.7 lib/sidekiq_unique_jobs/lua/update_version.lua
sidekiq-unique-jobs-7.0.6 lib/sidekiq_unique_jobs/lua/update_version.lua
sidekiq-unique-jobs-7.0.5 lib/sidekiq_unique_jobs/lua/update_version.lua
sidekiq-unique-jobs-7.0.4 lib/sidekiq_unique_jobs/lua/update_version.lua
sidekiq-unique-jobs-7.0.3 lib/sidekiq_unique_jobs/lua/update_version.lua
sidekiq-unique-jobs-7.0.2 lib/sidekiq_unique_jobs/lua/update_version.lua
sidekiq-unique-jobs-7.0.1 lib/sidekiq_unique_jobs/lua/update_version.lua
sidekiq-unique-jobs-7.0.0 lib/sidekiq_unique_jobs/lua/update_version.lua
sidekiq-unique-jobs-7.0.0.beta29 lib/sidekiq_unique_jobs/lua/update_version.lua
sidekiq-unique-jobs-7.0.0.beta28 lib/sidekiq_unique_jobs/lua/update_version.lua
sidekiq-unique-jobs-7.0.0.beta27 lib/sidekiq_unique_jobs/lua/update_version.lua
sidekiq-unique-jobs-7.0.0.beta26 lib/sidekiq_unique_jobs/lua/update_version.lua
sidekiq-unique-jobs-7.0.0.beta25 lib/sidekiq_unique_jobs/lua/update_version.lua
sidekiq-unique-jobs-7.0.0.beta24 lib/sidekiq_unique_jobs/lua/update_version.lua
sidekiq-unique-jobs-7.0.0.beta23 lib/sidekiq_unique_jobs/lua/update_version.lua
sidekiq-unique-jobs-7.0.0.beta22 lib/sidekiq_unique_jobs/lua/update_version.lua
sidekiq-unique-jobs-7.0.0.beta21 lib/sidekiq_unique_jobs/lua/update_version.lua
sidekiq-unique-jobs-7.0.0.beta20 lib/sidekiq_unique_jobs/lua/update_version.lua
sidekiq-unique-jobs-7.0.0.beta19 lib/sidekiq_unique_jobs/lua/update_version.lua
sidekiq-unique-jobs-7.0.0.beta18 lib/sidekiq_unique_jobs/lua/update_version.lua