Make Repo Code Indexer an Unique Queue (#17515)

The functioning of the code indexer queue really only makes sense as an unique queue
and doing this allows use to simplify the indexer data to simply delete the data if
the repo is no longer in the db.

Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
zeripath authored and GitHub committed 2021-11-02 11:14:24 +08:00
1 parent e2995ef515
commit cb9c8184c9
3 files changed
+11 -24

No files matched your search

+1 -1
View File
@@ -109,7 +109,7 @@ func (r *indexerNotifier) NotifyDeleteComment(doer *models.User, comment *models
func (r *indexerNotifier) NotifyDeleteRepository(doer *models.User, repo *models.Repository) {
issue_indexer.DeleteRepoIssueIndexer(repo)
if setting.Indexer.RepoIndexerEnabled {
code_indexer.DeleteRepoFromIndexer(repo)
code_indexer.UpdateRepoIndexer(repo)
}
}