zhou zhou
3 天以前 464116335cba47ddce55ee3a4ddc87af7fee5d15
1
2
3
4
5
6
7
8
9
local taskValue = ARGV[1]
local ttl = tonumber(ARGV[2])
 
if redis.call('exists', KEYS[1]) == 1 then
  return 0
end
 
redis.call('psetex', KEYS[1], ttl, taskValue)
return 1