Commit 33ce03fd authored by hujiebin's avatar hujiebin

后进先出

parent e107c9c0
......@@ -135,7 +135,8 @@ func check() {
func deal() {
for true {
//不需要加锁,注意,阻塞。
strs, err := redisCli.GetRedis().BLPop(context.Background(), time.Second, SocketQueueSendGift).Result()
// 后进先出
strs, err := redisCli.GetRedis().BRPop(context.Background(), time.Second, SocketQueueSendGift).Result()
if err != nil {
if err != redis.Nil {
mylogrus.MyLog.Errorf("cron sendGiftChan redisCli.GetRedis().BLPop err:+%v", err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment