lua.CleanUpExpiredSemaphoreLocksScript.lua Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redpulsar-core Show documentation
Show all versions of redpulsar-core Show documentation
Provides core functionality for RedPulsar Distributed locks and utilities.
The newest version!
local leasersKey = KEYS[1]
local leasers = redis.call("smembers", leasersKey)
for _, leaser in ipairs(leasers) do
local leaserValidityKey = ARGV[1] .. leaser
if redis.call("exists", leaserValidityKey) == 0 then
redis.call("srem", leasersKey, leaser)
end
end