diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-11-24 15:56:24 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-24 15:56:24 +0800 |
commit | c97d66d23cf14e88514cccb88c393d21db51ab7a (patch) | |
tree | 625857bea77befb61847c01bf17aac1177255787 /services/cron | |
parent | 754fdd8f9c2b1e4e78d507fd414968334cf586fd (diff) | |
download | gitea-c97d66d23cf14e88514cccb88c393d21db51ab7a.tar.gz gitea-c97d66d23cf14e88514cccb88c393d21db51ab7a.zip |
Move repofiles from modules/repofiles to services/repository/files (#17774)
* Move repofiles from modules to services
* rename services/repository/repofiles -> services/repository/files
* Fix test
Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'services/cron')
-rw-r--r-- | services/cron/tasks_basic.go | 2 | ||||
-rw-r--r-- | services/cron/tasks_extended.go | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/services/cron/tasks_basic.go b/services/cron/tasks_basic.go index 219173ccf0..4832ca98a7 100644 --- a/services/cron/tasks_basic.go +++ b/services/cron/tasks_basic.go @@ -10,11 +10,11 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/models/webhook" - repository_service "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/setting" "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" ) func registerUpdateMirrorTask() { diff --git a/services/cron/tasks_extended.go b/services/cron/tasks_extended.go index b0cb5ee921..95293b1c1d 100644 --- a/services/cron/tasks_extended.go +++ b/services/cron/tasks_extended.go @@ -9,7 +9,6 @@ import ( "time" "code.gitea.io/gitea/models" - repo_module "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/updatechecker" repo_service "code.gitea.io/gitea/services/repository" @@ -56,7 +55,7 @@ func registerGarbageCollectRepositories() { Args: setting.Git.GCArgs, }, func(ctx context.Context, _ *models.User, config Config) error { rhcConfig := config.(*RepoHealthCheckConfig) - return repo_module.GitGcRepos(ctx, rhcConfig.Timeout, rhcConfig.Args...) + return repo_service.GitGcRepos(ctx, rhcConfig.Timeout, rhcConfig.Args...) }) } @@ -96,7 +95,7 @@ func registerReinitMissingRepositories() { RunAtStart: false, Schedule: "@every 72h", }, func(ctx context.Context, _ *models.User, _ Config) error { - return repo_module.ReinitMissingRepositories(ctx) + return repo_service.ReinitMissingRepositories(ctx) }) } @@ -106,7 +105,7 @@ func registerDeleteMissingRepositories() { RunAtStart: false, Schedule: "@every 72h", }, func(ctx context.Context, user *models.User, _ Config) error { - return repo_module.DeleteMissingRepositories(ctx, user) + return repo_service.DeleteMissingRepositories(ctx, user) }) } |