Commit 62ab4786 authored by meng.cheng's avatar meng.cheng

修复bug

parent 1f79d4a4
......@@ -7,7 +7,6 @@ import (
"git.quantgroup.cn/DevOps/enoch/pkg/api-server"
"git.quantgroup.cn/DevOps/enoch/pkg/glog"
"github.com/valyala/fasthttp"
"github.com/vrg0/go-common/consul-kv"
"github.com/vrg0/go-common/registry"
"strconv"
"strings"
......@@ -83,13 +82,13 @@ func doUpDown(target string, sysName string, weight float64, force bool) error {
if weight > 0 {
//获取metadata(非必须,可获取失败)
v, err := consul_kv.GetValue("node:" + sysName + ":" + endpoint)
/* v, err := consul_kv.GetValue("node:" + sysName + ":" + endpoint)
if err == nil {
meta := make(map[string]string)
if e := json.Unmarshal([]byte(v), &meta); e == nil {
node.Meta = meta
}
}
}*/
//上线
if err := registry.Register(node); err != nil {
......
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