diff options
Diffstat (limited to 'services/cron')
-rw-r--r-- | services/cron/tasks_basic.go | 7 | ||||
-rw-r--r-- | services/cron/tasks_extended.go | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/services/cron/tasks_basic.go b/services/cron/tasks_basic.go index 814f6eae4e..fdf8550c31 100644 --- a/services/cron/tasks_basic.go +++ b/services/cron/tasks_basic.go @@ -15,7 +15,8 @@ import ( "code.gitea.io/gitea/services/auth" "code.gitea.io/gitea/services/migrations" mirror_service "code.gitea.io/gitea/services/mirror" - repository_service "code.gitea.io/gitea/services/repository" + repo_service "code.gitea.io/gitea/services/repository" + archiver_service "code.gitea.io/gitea/services/repository/archiver" ) func registerUpdateMirrorTask() { @@ -56,7 +57,7 @@ func registerRepoHealthCheck() { Args: []string{}, }, func(ctx context.Context, _ *user_model.User, config Config) error { rhcConfig := config.(*RepoHealthCheckConfig) - return repository_service.GitFsck(ctx, rhcConfig.Timeout, rhcConfig.Args) + return repo_service.GitFsck(ctx, rhcConfig.Timeout, rhcConfig.Args) }) } @@ -80,7 +81,7 @@ func registerArchiveCleanup() { OlderThan: 24 * time.Hour, }, func(ctx context.Context, _ *user_model.User, config Config) error { acConfig := config.(*OlderThanConfig) - return models.DeleteOldRepositoryArchives(ctx, acConfig.OlderThan) + return archiver_service.DeleteOldRepositoryArchives(ctx, acConfig.OlderThan) }) } diff --git a/services/cron/tasks_extended.go b/services/cron/tasks_extended.go index 26dbe548a7..bc6add090b 100644 --- a/services/cron/tasks_extended.go +++ b/services/cron/tasks_extended.go @@ -13,6 +13,7 @@ import ( "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/updatechecker" repo_service "code.gitea.io/gitea/services/repository" + archiver_service "code.gitea.io/gitea/services/repository/archiver" user_service "code.gitea.io/gitea/services/user" ) @@ -36,7 +37,7 @@ func registerDeleteRepositoryArchives() { RunAtStart: false, Schedule: "@annually", }, func(ctx context.Context, _ *user_model.User, _ Config) error { - return repo_service.DeleteRepositoryArchives(ctx) + return archiver_service.DeleteRepositoryArchives(ctx) }) } |