diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-12-06 15:19:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-06 15:19:28 +0800 |
commit | dcdb4873c8d77a444526fad5b1c8e705fdfe149d (patch) | |
tree | 599efda4334775ef40db9dd845355dfde7d73b33 /services/cron/tasks_basic.go | |
parent | f49d160447899270fbca6370cb7ab2742dce85dc (diff) | |
download | gitea-dcdb4873c8d77a444526fad5b1c8e705fdfe149d.tar.gz gitea-dcdb4873c8d77a444526fad5b1c8e705fdfe149d.zip |
Move repo archiver to models/repo (#17913)
* Move repo archiver to models/repo
* Move archiver service into services/repository/
* Fix imports
* Fix test
* Fix test
Diffstat (limited to 'services/cron/tasks_basic.go')
-rw-r--r-- | services/cron/tasks_basic.go | 7 |
1 files changed, 4 insertions, 3 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) }) } |