Move code indexer related code to a new package (#9191)

* move code indexer related code to a new package

* fix lint

* fix tests

* fix fmt

* GetMaxID support interface parameter
This commit is contained in:
Lunny Xiao 2019-12-09 03:15:35 +08:00 committed by techknowlogick
parent baf089e5b9
commit be06dee04c
9 changed files with 434 additions and 379 deletions

View file

@ -15,6 +15,7 @@ import (
"code.gitea.io/gitea/modules/cron"
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/highlight"
code_indexer "code.gitea.io/gitea/modules/indexer/code"
issue_indexer "code.gitea.io/gitea/modules/indexer/issues"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/markup"
@ -102,7 +103,7 @@ func GlobalInit() {
// Booting long running goroutines.
cron.NewContext()
issue_indexer.InitIssueIndexer(false)
models.InitRepoIndexer()
code_indexer.InitRepoIndexer()
mirror_service.InitSyncMirrors()
webhook.InitDeliverHooks()
pull_service.Init()