zhou zhou
4 天以前 7a215e51f9f4066f2024d8476e5b5db2c06358a1
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