summaryrefslogtreecommitdiffstats
path: root/services/mirror/mirror_pull.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2022-03-27 15:40:17 +0100
committerGitHub <noreply@github.com>2022-03-27 15:40:17 +0100
commitd2ca021df0eccd6103b9f0f4a0b942dc95bd18b8 (patch)
tree74ace2a113db00319a420cba2b2ce4ce456c0ced /services/mirror/mirror_pull.go
parentc29fbc6d2316b8b42b37c3b379eb2297f7a93aeb (diff)
downloadgitea-d2ca021df0eccd6103b9f0f4a0b942dc95bd18b8.tar.gz
gitea-d2ca021df0eccd6103b9f0f4a0b942dc95bd18b8.zip
Touch mirrors on even on fail to update (#19217)
* Touch mirrors on even on fail to update If a mirror fails to be synchronised it should be pushed to the bottom of the queue of the awaiting mirrors to be synchronised. At present if there LIMIT number of broken mirrors they can effectively prevent all other mirrors from being synchronized as their last_updated time will remain earlier than other mirrors. Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'services/mirror/mirror_pull.go')
-rw-r--r--services/mirror/mirror_pull.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/services/mirror/mirror_pull.go b/services/mirror/mirror_pull.go
index d032a932cf..d142a48ca0 100644
--- a/services/mirror/mirror_pull.go
+++ b/services/mirror/mirror_pull.go
@@ -411,6 +411,9 @@ func SyncPullMirror(ctx context.Context, repoID int64) bool {
log.Trace("SyncMirrors [repo: %-v]: Running Sync", m.Repo)
results, ok := runSync(ctx, m)
if !ok {
+ if err = repo_model.TouchMirror(ctx, m); err != nil {
+ log.Error("SyncMirrors [repo: %-v]: failed to TouchMirror: %v", m.Repo, err)
+ }
return false
}