Browse Source

Merge branch 'feature/eta1.0.0' into debug

# Conflicts:
#	models/db.go
#	routers/router.go
xyxie 1 year ago
parent
commit
2ebc1215c7
1 changed files with 5 additions and 5 deletions
  1. 5 5
      models/db.go

+ 5 - 5
models/db.go

@@ -43,12 +43,12 @@ func init() {
 	data_db, _ := orm.GetDB("data")
 	data_db.SetConnMaxLifetime(10 * time.Minute)
 
-	//_ = orm.RegisterDataBase("eta", "mysql", utils.MYSQL_URL_ETA)
-	//orm.SetMaxIdleConns("eta", 50)
-	//orm.SetMaxOpenConns("eta", 100)
+	_ = orm.RegisterDataBase("eta", "mysql", utils.MYSQL_URL_ETA)
+	orm.SetMaxIdleConns("eta", 50)
+	orm.SetMaxOpenConns("eta", 100)
 
-	//etaDb, _ := orm.GetDB("eta")
-	//etaDb.SetConnMaxLifetime(10 * time.Minute)
+	etaDb, _ := orm.GetDB("eta")
+	etaDb.SetConnMaxLifetime(10 * time.Minute)
 
 	orm.Debug = true
 	orm.DebugLog = orm.NewLog(utils.Binlog)