mirror of
https://github.com/ddworken/hishtory.git
synced 2025-06-20 11:57:50 +02:00
Rename misleading var
This commit is contained in:
parent
2ba535b650
commit
f77eb38618
@ -625,18 +625,16 @@ func InitDB() {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
tx, err := GLOBAL_DB.DB()
|
||||
sqlDb, err := GLOBAL_DB.DB()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
err = tx.Ping()
|
||||
err = sqlDb.Ping()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if isProductionEnvironment() {
|
||||
tx.SetMaxIdleConns(10)
|
||||
tx.SetMaxOpenConns(100)
|
||||
tx.SetConnMaxLifetime(time.Minute * 30)
|
||||
sqlDb.SetMaxIdleConns(10)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user