judge use lpush
This commit is contained in:
parent
2c5836f8c8
commit
5931481c03
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue