judge use lpush

This commit is contained in:
710leo 2020-03-29 20:01:33 +08:00
parent 2c5836f8c8
commit 5931481c03
1 changed files with 3 additions and 3 deletions

View File

@ -27,10 +27,10 @@ func Push(event *dataobj.Event) error {
rc := RedisConnPools[i].Get()
defer rc.Close()
// 写入用lpush 读出应该用 rpop
// 如果写入用lpush 则读出应该用 rpop
// 如果写入用rpush 则读出应该用 lpop
stats.Counter.Set("redis.push", 1)
_, err = rc.Do("RPUSH", event.Partition, string(bytes))
_, err = rc.Do("LPUSH", event.Partition, string(bytes))
if err == nil {
succ = true
break