Commit f13c1695 by lzzzzl

检测db是否连接

parent eaffd661
Showing with 25 additions and 5 deletions
......@@ -72,11 +72,31 @@ func main() {
_ = logger.InitLogger("file", logConfig)
logger.Init()
_ = initDb("InitSeoDB", util.Configs.Seo_databases.Dns)
_ = initDb("InitSpuDB", util.Configs.Spu_databases.Dns)
_ = initDb("InitGoodsDB", util.Configs.Goods_databases.Dns)
_ = initDb("InitSkuDB", util.Configs.Sku_databases.Dns)
_ = initDb("InitLxDB", util.Configs.Liexin_databases.Dns)
err_seo := initDb("InitSeoDB", util.Configs.Seo_databases.Dns)
err_spu := initDb("InitSpuDB", util.Configs.Spu_databases.Dns)
err_goods := initDb("InitGoodsDB", util.Configs.Goods_databases.Dns)
err_sku := initDb("InitSkuDB", util.Configs.Sku_databases.Dns)
err_lx := initDb("InitLxDB", util.Configs.Liexin_databases.Dns)
if err_goods != nil {
fmt.Println(err_goods)
}
if err_spu != nil {
fmt.Println(err_goods)
}
if err_seo != nil {
fmt.Println(err_seo)
}
if err_sku != nil {
fmt.Println(err_sku)
}
if err_lx != nil {
fmt.Println(err_lx)
}
t := &RecvPro{}
go rabbitmq.Recv(rabbitmq.QueueExchange{
......
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 sign in to comment