mirror of
https://gitee.com/gitea/gitea
synced 2025-12-31 04:36:35 +08:00
Use buffersize to reduce database connection when iterate (#2724)
* use buffersize to reduce database connection when iterate * fix typo * add default value on app.ini comment
This commit is contained in:
@@ -42,7 +42,7 @@ func generateAndMigrateGitHooks(x *xorm.Engine) (err error) {
|
||||
}
|
||||
)
|
||||
|
||||
return x.Where("id > 0").Iterate(new(Repository),
|
||||
return x.Where("id > 0").BufferSize(setting.IterateBufferSize).Iterate(new(Repository),
|
||||
func(idx int, bean interface{}) error {
|
||||
repo := bean.(*Repository)
|
||||
user := new(User)
|
||||
|
||||
Reference in New Issue
Block a user