mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-23 09:30:50 +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:
parent
b10cb7b258
commit
73f5ca70de
25 changed files with 226 additions and 149 deletions
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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue