|
@@ -12,8 +12,10 @@ func init() {
|
|
|
_ = orm.RegisterDataBase("rddp", "mysql", utils.MYSQL_URL_RDDP)
|
|
|
orm.SetMaxIdleConns("rddp", 50)
|
|
|
orm.SetMaxOpenConns("rddp", 100)
|
|
|
-
|
|
|
- report_db, _ := orm.GetDB("rddp")
|
|
|
+ report_db, err := orm.GetDB("rddp")
|
|
|
+ if err != nil {
|
|
|
+ utils.FileLog.Error("连接研报数据库失败" + err.Error())
|
|
|
+ }
|
|
|
report_db.SetConnMaxLifetime(10 * time.Minute)
|
|
|
|
|
|
_ = orm.RegisterDataBase("default", "mysql", utils.MYSQL_URL_MASTER)
|