Browse Source

conf: change default mirror checking interval to 10m

tags/v1.21.12.1
Unknwon 9 years ago
parent
commit
4e822c1911
3 changed files with 4 additions and 8 deletions
  1. +1
    -1
      conf/app.ini
  2. +1
    -5
      models/repo.go
  3. +2
    -2
      modules/bindata/bindata.go

+ 1
- 1
conf/app.ini View File

@@ -314,7 +314,7 @@ RUN_AT_START = false

; Update mirrors
[cron.update_mirrors]
SCHEDULE = @every 1h
SCHEDULE = @every 10m

; Repository health check
[cron.repo_health_check]


+ 1
- 5
models/repo.go View File

@@ -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


+ 2
- 2
modules/bindata/bindata.go
File diff suppressed because it is too large
View File


Loading…
Cancel
Save