mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-01-30 10:48:15 +00:00
Merge branch 'master' into graceful-queues
This commit is contained in:
parent
b1c9fa7f1a
commit
4d8b8ed02e
3 changed files with 3 additions and 12 deletions
|
@ -266,8 +266,3 @@ func (b *BleveIndexer) Search(keyword string, repoIDs []int64, limit, start int)
|
||||||
}
|
}
|
||||||
return &ret, nil
|
return &ret, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Close the Index
|
|
||||||
func (b *BleveIndexer) Close() error {
|
|
||||||
return b.indexer.Close()
|
|
||||||
}
|
|
||||||
|
|
|
@ -26,8 +26,7 @@ func (db *DBIndexer) Delete(ids ...int64) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Close dummy function
|
// Close dummy function
|
||||||
func (db *DBIndexer) Close() error {
|
func (db *DBIndexer) Close() {
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Search dummy function
|
// Search dummy function
|
||||||
|
|
|
@ -48,7 +48,7 @@ type Indexer interface {
|
||||||
Index(issue []*IndexerData) error
|
Index(issue []*IndexerData) error
|
||||||
Delete(ids ...int64) error
|
Delete(ids ...int64) error
|
||||||
Search(kw string, repoIDs []int64, limit, start int) (*SearchResult, error)
|
Search(kw string, repoIDs []int64, limit, start int) (*SearchResult, error)
|
||||||
Close() error
|
Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
type indexerHolder struct {
|
type indexerHolder struct {
|
||||||
|
@ -156,10 +156,7 @@ func InitIssueIndexer(syncReindex bool) {
|
||||||
log.Debug("Closing issue indexer")
|
log.Debug("Closing issue indexer")
|
||||||
issueIndexer := holder.get()
|
issueIndexer := holder.get()
|
||||||
if issueIndexer != nil {
|
if issueIndexer != nil {
|
||||||
err := issueIndexer.Close()
|
issueIndexer.Close()
|
||||||
if err != nil {
|
|
||||||
log.Error("Error whilst closing the issue indexer: %v", err)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
log.Info("PID: %d Issue Indexer closed", os.Getpid())
|
log.Info("PID: %d Issue Indexer closed", os.Getpid())
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue