summaryrefslogtreecommitdiffstats
path: root/modules/cron/cron.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/cron/cron.go')
-rw-r--r--modules/cron/cron.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/cron/cron.go b/modules/cron/cron.go
index fe87f86e02..089f0fa767 100644
--- a/modules/cron/cron.go
+++ b/modules/cron/cron.go
@@ -12,6 +12,7 @@ import (
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/sync"
+ mirror_service "code.gitea.io/gitea/services/mirror"
"github.com/gogs/cron"
)
@@ -51,14 +52,14 @@ func NewContext() {
err error
)
if setting.Cron.UpdateMirror.Enabled {
- entry, err = c.AddFunc("Update mirrors", setting.Cron.UpdateMirror.Schedule, WithUnique(mirrorUpdate, models.MirrorUpdate))
+ entry, err = c.AddFunc("Update mirrors", setting.Cron.UpdateMirror.Schedule, WithUnique(mirrorUpdate, mirror_service.Update))
if err != nil {
log.Fatal("Cron[Update mirrors]: %v", err)
}
if setting.Cron.UpdateMirror.RunAtStart {
entry.Prev = time.Now()
entry.ExecTimes++
- go WithUnique(mirrorUpdate, models.MirrorUpdate)()
+ go WithUnique(mirrorUpdate, mirror_service.Update)()
}
}
if setting.Cron.RepoHealthCheck.Enabled {