mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-01 20:32:11 +00:00
Add golangci (#6418)
This commit is contained in:
parent
5832f8d90d
commit
f9ec2f89f2
147 changed files with 1046 additions and 774 deletions
|
@ -101,7 +101,12 @@ func InitIssueIndexer(syncReindex bool) error {
|
|||
return fmt.Errorf("Unsupported indexer queue type: %v", setting.Indexer.IssueQueueType)
|
||||
}
|
||||
|
||||
go issueIndexerQueue.Run()
|
||||
go func() {
|
||||
err = issueIndexerQueue.Run()
|
||||
if err != nil {
|
||||
log.Error("issueIndexerQueue.Run: %v", err)
|
||||
}
|
||||
}()
|
||||
|
||||
if populate {
|
||||
if syncReindex {
|
||||
|
@ -161,7 +166,7 @@ func UpdateIssueIndexer(issue *models.Issue) {
|
|||
comments = append(comments, comment.Content)
|
||||
}
|
||||
}
|
||||
issueIndexerQueue.Push(&IndexerData{
|
||||
_ = issueIndexerQueue.Push(&IndexerData{
|
||||
ID: issue.ID,
|
||||
RepoID: issue.RepoID,
|
||||
Title: issue.Title,
|
||||
|
@ -179,11 +184,11 @@ func DeleteRepoIssueIndexer(repo *models.Repository) {
|
|||
return
|
||||
}
|
||||
|
||||
if len(ids) <= 0 {
|
||||
if len(ids) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
issueIndexerQueue.Push(&IndexerData{
|
||||
_ = issueIndexerQueue.Push(&IndexerData{
|
||||
IDs: ids,
|
||||
IsDelete: true,
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue