added pointer to node list

This commit is contained in:
marvzhang
2020-01-11 16:42:04 +08:00
parent e5cd929a2a
commit 72cad7bf64
2 changed files with 14 additions and 3 deletions

View File

@@ -9,6 +9,7 @@ import (
"encoding/json"
"fmt"
"github.com/apex/log"
"github.com/gomodule/redigo/redis"
uuid "github.com/satori/go.uuid"
"runtime/debug"
)
@@ -185,10 +186,12 @@ func InitRpcService() error {
}
// 获取获取消息队列信息
dataStr, err := database.RedisClient.BRPop(fmt.Sprintf("rpc:%s", node.Id.Hex()), constants.Infinite)
dataStr, err := database.RedisClient.BRPop(fmt.Sprintf("rpc:%s", node.Id.Hex()), 0)
if err != nil {
log.Errorf(err.Error())
debug.PrintStack()
if err != redis.ErrNil {
log.Errorf(err.Error())
debug.PrintStack()
}
continue
}