mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Upgrade xorm to v1.0.1 and fix start fail with potgres (#10819)
* upgrade xorm to v1.0.1 * fix start fail with postgres Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
8
vendor/xorm.io/xorm/engine_group.go
generated
vendored
8
vendor/xorm.io/xorm/engine_group.go
generated
vendored
@@ -161,17 +161,17 @@ func (eg *EngineGroup) SetMapper(mapper names.Mapper) {
|
||||
|
||||
// SetMaxIdleConns set the max idle connections on pool, default is 2
|
||||
func (eg *EngineGroup) SetMaxIdleConns(conns int) {
|
||||
eg.Engine.dialect.DB().SetMaxIdleConns(conns)
|
||||
eg.Engine.DB().SetMaxIdleConns(conns)
|
||||
for i := 0; i < len(eg.slaves); i++ {
|
||||
eg.slaves[i].dialect.DB().SetMaxIdleConns(conns)
|
||||
eg.slaves[i].DB().SetMaxIdleConns(conns)
|
||||
}
|
||||
}
|
||||
|
||||
// SetMaxOpenConns is only available for go 1.2+
|
||||
func (eg *EngineGroup) SetMaxOpenConns(conns int) {
|
||||
eg.Engine.dialect.DB().SetMaxOpenConns(conns)
|
||||
eg.Engine.DB().SetMaxOpenConns(conns)
|
||||
for i := 0; i < len(eg.slaves); i++ {
|
||||
eg.slaves[i].dialect.DB().SetMaxOpenConns(conns)
|
||||
eg.slaves[i].DB().SetMaxOpenConns(conns)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user