0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-12-11 08:44:40 +01:00
This commit is contained in:
Lunny Xiao 2025-09-02 10:08:45 -07:00
parent 88be11d968
commit c10c1b32db
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
2 changed files with 4 additions and 1 deletions

View File

@ -3072,6 +3072,7 @@ dashboard.sync_branch.started = Branches Sync started
dashboard.sync_tag.started = Tags Sync started
dashboard.rebuild_issue_indexer = Rebuild issue indexer
dashboard.sync_repo_licenses = Sync repo licenses
dashboard.cleanup_repo_lock_files = Clean up repository lock files
users.user_manage_panel = User Account Management
users.new_account = Create User Account

View File

@ -10,6 +10,8 @@ import (
repo_model "code.gitea.io/gitea/models/repo"
"code.gitea.io/gitea/modules/gitrepo"
"code.gitea.io/gitea/modules/log"
"xorm.io/builder"
)
func CleanupRepo(ctx context.Context) error {
@ -17,7 +19,7 @@ func CleanupRepo(ctx context.Context) error {
if err := db.Iterate(
ctx,
nil,
builder.Eq{"is_empty": false},
func(ctx context.Context, repo *repo_model.Repository) error {
select {
case <-ctx.Done():