conf: change default mirror checking interval to 10m
This commit is contained in:
parent
26d52ceb48
commit
4e822c1911
|
@ -314,7 +314,7 @@ RUN_AT_START = false
|
||||||
|
|
||||||
; Update mirrors
|
; Update mirrors
|
||||||
[cron.update_mirrors]
|
[cron.update_mirrors]
|
||||||
SCHEDULE = @every 1h
|
SCHEDULE = @every 10m
|
||||||
|
|
||||||
; Repository health check
|
; Repository health check
|
||||||
[cron.repo_health_check]
|
[cron.repo_health_check]
|
||||||
|
|
|
@ -1651,12 +1651,8 @@ func MirrorUpdate() {
|
||||||
log.Trace("Doing: MirrorUpdate")
|
log.Trace("Doing: MirrorUpdate")
|
||||||
|
|
||||||
mirrors := make([]*Mirror, 0, 10)
|
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)
|
m := bean.(*Mirror)
|
||||||
if m.NextUpdate.After(time.Now()) {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
if m.Repo == nil {
|
if m.Repo == nil {
|
||||||
log.Error(4, "Disconnected mirror repository found: %d", m.ID)
|
log.Error(4, "Disconnected mirror repository found: %d", m.ID)
|
||||||
return nil
|
return nil
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue