1、修改consul不能注册的bug
This commit is contained in:
parent
46d29e280b
commit
d72710bc8e
|
@ -77,7 +77,7 @@ func NewStartCmd() *cobra.Command {
|
||||||
//创建注册对象
|
//创建注册对象
|
||||||
tags := make([]string, 1)
|
tags := make([]string, 1)
|
||||||
tags[0] = "control"
|
tags[0] = "control"
|
||||||
consulCfg, err := discover.NewConsulConfig(cfg.Consul.Host, cfg.Name, cfg.Name, cfg.Consul.Host, cfg.Consul.Port,
|
consulCfg, err := discover.NewConsulConfig(fmt.Sprintf("%s:%d", cfg.Consul.Host, cfg.Consul.Port), cfg.Name, cfg.Name, cfg.Consul.Host, cfg.Consul.Port,
|
||||||
tags, 300, 300, 300)
|
tags, 300, 300, 300)
|
||||||
must(err)
|
must(err)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package model
|
package model
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
@ -26,6 +27,7 @@ func New(driveName, dsn string, showSql bool) {
|
||||||
&TaskResult{},
|
&TaskResult{},
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
fmt.Println("同步数据库表结构", err)
|
||||||
zap.L().Error("同步数据库表结构", zap.Error(err))
|
zap.L().Error("同步数据库表结构", zap.Error(err))
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue