Allow presence keys to expire if not periodically renewed

This commit is contained in:
Jon Chambers
2022-06-27 17:45:06 -04:00
committed by Jon Chambers
parent 4e131858ca
commit 92d36b725f
4 changed files with 101 additions and 5 deletions

View File

@@ -0,0 +1,7 @@
local presenceKey = KEYS[1]
local presenceUuid = ARGV[1]
local expireSeconds = ARGV[2]
if redis.call("GET", presenceKey) == presenceUuid then
redis.call("EXPIRE", presenceKey, expireSeconds)
end