summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-08-16 12:05:15 +0800
committerGitHub <noreply@github.com>2022-08-16 12:05:15 +0800
commit1f146090ecbd9876ed41ddccc4d05ee1bedbb48e (patch)
tree04a4f06ff8f9976f6dc8814a30585cc5b41247bf /services
parent86c85c19b625e6ddd99f220a13ee3b5c4cc398e1 (diff)
downloadgitea-1f146090ecbd9876ed41ddccc4d05ee1bedbb48e.tar.gz
gitea-1f146090ecbd9876ed41ddccc4d05ee1bedbb48e.zip
Add migrate repo archiver and packages storage support on command line (#20757)
* Add migrate repo archiver and packages storage support on command line * Fix typo * Use stdCtx * Use packageblob and fix command description * Add migrate packages unit tests * Fix comment year * Fix the migrate storage command line description * Update cmd/migrate_storage.go Co-authored-by: zeripath <art27@cantab.net> * Update cmd/migrate_storage.go Co-authored-by: zeripath <art27@cantab.net> * Update cmd/migrate_storage.go Co-authored-by: zeripath <art27@cantab.net> * Fix test Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'services')
-rw-r--r--services/repository/avatar.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/repository/avatar.go b/services/repository/avatar.go
index dcf04c7e54..b9bd36ab66 100644
--- a/services/repository/avatar.go
+++ b/services/repository/avatar.go
@@ -96,7 +96,7 @@ func DeleteAvatar(repo *repo_model.Repository) error {
// RemoveRandomAvatars removes the randomly generated avatars that were created for repositories
func RemoveRandomAvatars(ctx context.Context) error {
- return repo_model.IterateRepository(func(repository *repo_model.Repository) error {
+ return db.IterateObjects(ctx, func(repository *repo_model.Repository) error {
select {
case <-ctx.Done():
return db.ErrCancelledf("before random avatars removed for %s", repository.FullName())