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 {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
tx, err := GLOBAL_DB.DB()
|
sqlDb, err := GLOBAL_DB.DB()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
err = tx.Ping()
|
err = sqlDb.Ping()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
if isProductionEnvironment() {
|
if isProductionEnvironment() {
|
||||||
tx.SetMaxIdleConns(10)
|
sqlDb.SetMaxIdleConns(10)
|
||||||
tx.SetMaxOpenConns(100)
|
|
||||||
tx.SetConnMaxLifetime(time.Minute * 30)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user