Allow presence keys to expire if not periodically renewed

This commit is contained in:
Jon Chambers authored and Jon Chambers committed 2022-07-13 11:28:55 -04:00
1 parent 4e131858ca
commit 92d36b725f
4 files changed
+101 -5

No files matched your search

@@ -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