1
3 天以前 b1c9e5683cee961946e85297eb581f26cff694ef
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