~singpolyma/sgx-jmp

ref: f68da9cdf328b5817712497cae3db707622538e7 sgx-jmp/redis_lua/spopsadd.lua -rw-r--r-- 153 bytes
f68da9cdStephen Paul Weber The sugar version prevents the promise from being returned 1 year, 3 months ago
                                                                                
1
2
3
4
5
6
local addr = redis.call("spop", KEYS[1])
if not addr then
	return redis.error_reply("Nothing to SPOP")
end
redis.call("sadd", KEYS[2], addr)
return addr