1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 10:18:38 +00:00

Add PULL_LIMIT and PUSH_LIMIT to cron.update_mirror task (#17568)

This commit is contained in:
zeripath
2021-11-23 03:09:35 +00:00
committed by GitHub
parent 9450410ff7
commit 188fd2dd1a
6 changed files with 70 additions and 17 deletions

View File

@@ -107,5 +107,6 @@ func PushMirrorsIterate(f func(idx int, bean interface{}) error) error {
return db.GetEngine(db.DefaultContext).
Where("last_update + (`interval` / ?) <= ?", time.Second, time.Now().Unix()).
And("`interval` != 0").
OrderBy("last_update ASC").
Iterate(new(PushMirror), f)
}