优化代码

This commit is contained in:
陈景阳
2019-08-31 15:59:43 +08:00
parent 5e6aec2393
commit 8115f06496
3 changed files with 7 additions and 4 deletions

View File

@@ -304,6 +304,7 @@ func WorkerNodeCallback(channel string, msgStr string) {
// 获取本地日志
logStr, err := GetLocalLog(msg.LogPath)
log.Info(string(logStr))
if err != nil {
log.Errorf(err.Error())
debug.PrintStack()
@@ -322,7 +323,7 @@ func WorkerNodeCallback(channel string, msgStr string) {
}
// 发布消息给主节点
fmt.Println(msgSd)
log.Info("publish get log msg to master")
if err := database.Publish("nodes:master", string(msgSdBytes)); err != nil {
log.Errorf(err.Error())
return