Merge branch 'dev-lwl/consul' into test
This commit is contained in:
commit
930e39e500
|
@ -54,9 +54,8 @@ import (
|
|||
func Init(r *gin.Engine) {
|
||||
r.HandleMethodNotAllowed = true
|
||||
|
||||
// websocket长链接
|
||||
r.GET("/", ServeFile)
|
||||
r.GET("/ws", HandleWs)
|
||||
r.GET("/", HelloWorld)
|
||||
r.POST("/", HelloWorld)
|
||||
|
||||
// healthcheck
|
||||
r.GET("/healthcheck", Healthcheck)
|
||||
|
|
|
@ -108,7 +108,7 @@ func NewMysql(cfg *conf.ConfigSt) (mysql *Mysql, err error) {
|
|||
|
||||
mysql.dbVas, err = mysqldb.NewMysqlDB(cfg.MixMysql, DatabaseVas)
|
||||
if err != nil {
|
||||
logger.Error("NewMysqlDB fail, cfg: %v, db: %v, err: %v", util.ToJson(cfg.MixMongo), DatabaseVas, err)
|
||||
logger.Error("NewMysqlDB fail, cfg: %v, db: %v, err: %v", util.ToJson(cfg.MixMysql), DatabaseVas, err)
|
||||
return
|
||||
}
|
||||
mysql.dbVas.SetMaxOpenConns(20)
|
||||
|
@ -116,13 +116,13 @@ func NewMysql(cfg *conf.ConfigSt) (mysql *Mysql, err error) {
|
|||
|
||||
err = mysql.dbVas.Ping()
|
||||
if err != nil {
|
||||
logger.Error("MysqlDB ping fail, cfg: %v, db: %v, err: %v", util.ToJson(cfg.MixMongo), DatabaseVas, err)
|
||||
logger.Error("MysqlDB ping fail, cfg: %v, db: %v, err: %v", util.ToJson(cfg.MixMysql), DatabaseVas, err)
|
||||
return
|
||||
}
|
||||
|
||||
mysql.dbXxlJob, err = mysqldb.NewMysqlDB(cfg.MixMysql, DatabaseXxlJob)
|
||||
if err != nil {
|
||||
logger.Error("NewMysqlDB fail, cfg: %v, db: %v, err: %v", util.ToJson(cfg.MixMongo), DatabaseXxlJob, err)
|
||||
logger.Error("NewMysqlDB fail, cfg: %v, db: %v, err: %v", util.ToJson(cfg.MixMysql), DatabaseXxlJob, err)
|
||||
return
|
||||
}
|
||||
mysql.dbXxlJob.SetMaxOpenConns(20)
|
||||
|
@ -130,7 +130,7 @@ func NewMysql(cfg *conf.ConfigSt) (mysql *Mysql, err error) {
|
|||
|
||||
err = mysql.dbXxlJob.Ping()
|
||||
if err != nil {
|
||||
logger.Error("MysqlDB ping fail, cfg: %v, db: %v, err: %v", util.ToJson(cfg.MixMongo), DatabaseXxlJob, err)
|
||||
logger.Error("MysqlDB ping fail, cfg: %v, db: %v, err: %v", util.ToJson(cfg.MixMysql), DatabaseXxlJob, err)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue