add missing beginning and closing of session in migration
This commit is contained in:
parent
fa758ae603
commit
dcd1cba32f
|
|
@ -66,6 +66,10 @@ func removeStaleWatches(x *xorm.Engine) error {
|
|||
}
|
||||
|
||||
sess := x.NewSession()
|
||||
defer sess.Close()
|
||||
if err := sess.Begin(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
repoCache := make(map[int64]*Repository)
|
||||
err := x.BufferSize(setting.IterateBufferSize).Iterate(new(Watch),
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user