mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-28 06:57:22 +08:00
improve recordBatch reeis value
This commit is contained in:
@@ -138,7 +138,7 @@ for k, v in pairs(batchList) do
|
|||||||
local isBatchKeyNew = false
|
local isBatchKeyNew = false
|
||||||
if batchKey == false then
|
if batchKey == false then
|
||||||
batchKey = v .. ":" .. ARGV[4]
|
batchKey = v .. ":" .. ARGV[4]
|
||||||
redis.call("SET", v, batchKey, "EX", 2592000)
|
redis.call("SET", v, batchKey, "EX", 3600*3)
|
||||||
isBatchKeyNew = true
|
isBatchKeyNew = true
|
||||||
end
|
end
|
||||||
local hashKey
|
local hashKey
|
||||||
@@ -151,9 +151,9 @@ for k, v in pairs(batchList) do
|
|||||||
else
|
else
|
||||||
hashKey = ARGV[3]
|
hashKey = ARGV[3]
|
||||||
end
|
end
|
||||||
redis.call("HSETNX", batchKey, hashKey, ARGV[4])
|
redis.call("HSETNX", batchKey, hashKey, 1)
|
||||||
if isBatchKeyNew then
|
if isBatchKeyNew then
|
||||||
redis.call("EXPIRE", batchKey, 2592000)
|
redis.call("EXPIRE", batchKey, 3600*3)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
LUA;
|
LUA;
|
||||||
|
|||||||
Reference in New Issue
Block a user