summaryrefslogtreecommitdiffstats
path: root/services/mirror/mirror.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/mirror/mirror.go')
-rw-r--r--services/mirror/mirror.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/services/mirror/mirror.go b/services/mirror/mirror.go
index 82d8fc59b2..165e7cd35b 100644
--- a/services/mirror/mirror.go
+++ b/services/mirror/mirror.go
@@ -296,7 +296,7 @@ func Password(m *models.Mirror) string {
}
// Update checks and updates mirror repositories.
-func Update(ctx context.Context) {
+func Update(ctx context.Context) error {
log.Trace("Doing: Update")
if err := models.MirrorsIterate(func(idx int, bean interface{}) error {
m := bean.(*models.Mirror)
@@ -306,14 +306,17 @@ func Update(ctx context.Context) {
}
select {
case <-ctx.Done():
- return fmt.Errorf("Aborted due to shutdown")
+ return fmt.Errorf("Aborted")
default:
mirrorQueue.Add(m.RepoID)
return nil
}
}); err != nil {
- log.Error("Update: %v", err)
+ log.Trace("Update: %v", err)
+ return err
}
+ log.Trace("Finished: Update")
+ return nil
}
// SyncMirrors checks and syncs mirrors.