From 4d8b8ed02ea56e7d8e3b1bd3972fb87b73492789 Mon Sep 17 00:00:00 2001 From: Andrew Thornton Date: Mon, 30 Dec 2019 17:56:12 +0000 Subject: [PATCH] Merge branch 'master' into graceful-queues --- modules/indexer/issues/bleve.go | 5 ----- modules/indexer/issues/db.go | 3 +-- modules/indexer/issues/indexer.go | 7 ++----- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/modules/indexer/issues/bleve.go b/modules/indexer/issues/bleve.go index b9f505e4bf..787ff0dec5 100644 --- a/modules/indexer/issues/bleve.go +++ b/modules/indexer/issues/bleve.go @@ -266,8 +266,3 @@ func (b *BleveIndexer) Search(keyword string, repoIDs []int64, limit, start int) } return &ret, nil } - -// Close the Index -func (b *BleveIndexer) Close() error { - return b.indexer.Close() -} diff --git a/modules/indexer/issues/db.go b/modules/indexer/issues/db.go index 2a5df80fac..d0cca4fd18 100644 --- a/modules/indexer/issues/db.go +++ b/modules/indexer/issues/db.go @@ -26,8 +26,7 @@ func (db *DBIndexer) Delete(ids ...int64) error { } // Close dummy function -func (db *DBIndexer) Close() error { - return nil +func (db *DBIndexer) Close() { } // Search dummy function diff --git a/modules/indexer/issues/indexer.go b/modules/indexer/issues/indexer.go index 8676561cf1..34764b20f0 100644 --- a/modules/indexer/issues/indexer.go +++ b/modules/indexer/issues/indexer.go @@ -48,7 +48,7 @@ type Indexer interface { Index(issue []*IndexerData) error Delete(ids ...int64) error Search(kw string, repoIDs []int64, limit, start int) (*SearchResult, error) - Close() error + Close() } type indexerHolder struct { @@ -156,10 +156,7 @@ func InitIssueIndexer(syncReindex bool) { log.Debug("Closing issue indexer") issueIndexer := holder.get() if issueIndexer != nil { - err := issueIndexer.Close() - if err != nil { - log.Error("Error whilst closing the issue indexer: %v", err) - } + issueIndexer.Close() } log.Info("PID: %d Issue Indexer closed", os.Getpid()) })