Remove deprecated counters

This commit is contained in:
Jon Chambers
2021-10-13 16:01:51 -04:00
committed by Jon Chambers
parent eedeaaecee
commit c379a3d297
5 changed files with 3 additions and 144 deletions

View File

@@ -1,19 +0,0 @@
local destinationSetKey = KEYS[1]
local messageCountKey = KEYS[2]
local destination = ARGV[1]
redis.call("PFADD", destinationSetKey, destination)
local distinctDestinationCount = redis.call("PFCOUNT", destinationSetKey)
if redis.call("TTL", destinationSetKey) < 0 then
redis.call("EXPIRE", destinationSetKey, 86400)
end
local messageCount = redis.call("INCR", messageCountKey)
if messageCount == 1 then
redis.call("EXPIRE", messageCountKey, 86400)
end
return { distinctDestinationCount, messageCount }