aboutsummaryrefslogtreecommitdiffstats
path: root/modules/indexer/code/indexer.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/indexer/code/indexer.go')
-rw-r--r--modules/indexer/code/indexer.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/indexer/code/indexer.go b/modules/indexer/code/indexer.go
index e9b8e76500..f38fd6000c 100644
--- a/modules/indexer/code/indexer.go
+++ b/modules/indexer/code/indexer.go
@@ -166,7 +166,7 @@ func Init() {
handler := func(items ...*IndexerData) (unhandled []*IndexerData) {
idx, err := indexer.get()
if idx == nil || err != nil {
- log.Error("Codes indexer handler: unable to get indexer!")
+ log.Warn("Codes indexer handler: indexer is not ready, retry later.")
return items
}
@@ -201,7 +201,7 @@ func Init() {
return unhandled
}
- indexerQueue = queue.CreateUniqueQueue("code_indexer", handler)
+ indexerQueue = queue.CreateUniqueQueue(ctx, "code_indexer", handler)
if indexerQueue == nil {
log.Fatal("Unable to create codes indexer queue")
}
@@ -259,7 +259,7 @@ func Init() {
indexer.set(rIndexer)
// Start processing the queue
- go graceful.GetManager().RunWithShutdownFns(indexerQueue.Run)
+ go graceful.GetManager().RunWithCancel(indexerQueue)
if populate {
go graceful.GetManager().RunWithShutdownContext(populateRepoIndexer)