mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-03 09:52:26 +02:00
conf: change default mirror checking interval to 10m
This commit is contained in:
parent
26d52ceb48
commit
4e822c1911
3 changed files with 4 additions and 8 deletions
|
@ -1651,12 +1651,8 @@ func MirrorUpdate() {
|
|||
log.Trace("Doing: MirrorUpdate")
|
||||
|
||||
mirrors := make([]*Mirror, 0, 10)
|
||||
if err := x.Iterate(new(Mirror), func(idx int, bean interface{}) error {
|
||||
if err := x.Where("next_update_unix<=?", time.Now().Unix()).Iterate(new(Mirror), func(idx int, bean interface{}) error {
|
||||
m := bean.(*Mirror)
|
||||
if m.NextUpdate.After(time.Now()) {
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Repo == nil {
|
||||
log.Error(4, "Disconnected mirror repository found: %d", m.ID)
|
||||
return nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue