Browse Source

MaySaveNewTrans decode removed

pull/127/head
yedf2 4 years ago
parent
commit
da690eb9c0
  1. 6
      dtmsvr/storage/redis/redis.go

6
dtmsvr/storage/redis/redis.go

@ -141,19 +141,19 @@ func (s *RedisStore) MaySaveNewTrans(global *storage.TransGlobalStore, branches
AppendGid(global.Gid).
AppendObject(global).
AppendRaw(global.NextCronTime.Unix()).
AppendRaw(global.Gid).
AppendBranches(branches)
global.Steps = nil
global.Payloads = nil
_, err := callLua(a, `-- MaySaveNewTrans
local gs = cjson.decode(ARGV[3])
local g = redis.call('GET', KEYS[1])
if g ~= false then
return 'UNIQUE_CONFLICT'
end
redis.call('SET', KEYS[1], ARGV[3], 'EX', ARGV[2])
redis.call('ZADD', KEYS[3], ARGV[4], gs.gid)
for k = 5, table.getn(ARGV) do
redis.call('ZADD', KEYS[3], ARGV[4], ARGV[5])
for k = 6, table.getn(ARGV) do
redis.call('RPUSH', KEYS[2], ARGV[k])
end
redis.call('EXPIRE', KEYS[2], ARGV[2])

Loading…
Cancel
Save