diff options
author | Jason Song <i@wolfogre.com> | 2023-10-16 02:56:57 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-15 18:56:57 +0000 |
commit | 1be49fdda660bce8d33cbd52f9a04629f1878d8f (patch) | |
tree | a1d2ff8a682c95984ac6c8f03318521dc4cf9371 /services/indexer/notify.go | |
parent | cddf245c12223c783c856c87c21cc796ac425439 (diff) | |
download | gitea-1be49fdda660bce8d33cbd52f9a04629f1878d8f.tar.gz gitea-1be49fdda660bce8d33cbd52f9a04629f1878d8f.zip |
Improve retrying index issues (#27554)
Fix #27540
Diffstat (limited to 'services/indexer/notify.go')
-rw-r--r-- | services/indexer/notify.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/services/indexer/notify.go b/services/indexer/notify.go index a07bf38b06..e0b87faedb 100644 --- a/services/indexer/notify.go +++ b/services/indexer/notify.go @@ -36,11 +36,11 @@ func (r *indexerNotifier) AdoptRepository(ctx context.Context, doer, u *user_mod func (r *indexerNotifier) CreateIssueComment(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, issue *issues_model.Issue, comment *issues_model.Comment, mentions []*user_model.User, ) { - issue_indexer.UpdateIssueIndexer(issue.ID) + issue_indexer.UpdateIssueIndexer(ctx, issue.ID) } func (r *indexerNotifier) NewIssue(ctx context.Context, issue *issues_model.Issue, mentions []*user_model.User) { - issue_indexer.UpdateIssueIndexer(issue.ID) + issue_indexer.UpdateIssueIndexer(ctx, issue.ID) } func (r *indexerNotifier) NewPullRequest(ctx context.Context, pr *issues_model.PullRequest, mentions []*user_model.User) { @@ -48,7 +48,7 @@ func (r *indexerNotifier) NewPullRequest(ctx context.Context, pr *issues_model.P log.Error("LoadIssue: %v", err) return } - issue_indexer.UpdateIssueIndexer(pr.Issue.ID) + issue_indexer.UpdateIssueIndexer(ctx, pr.Issue.ID) } func (r *indexerNotifier) UpdateComment(ctx context.Context, doer *user_model.User, c *issues_model.Comment, oldContent string) { @@ -56,7 +56,7 @@ func (r *indexerNotifier) UpdateComment(ctx context.Context, doer *user_model.Us log.Error("LoadIssue: %v", err) return } - issue_indexer.UpdateIssueIndexer(c.Issue.ID) + issue_indexer.UpdateIssueIndexer(ctx, c.Issue.ID) } func (r *indexerNotifier) DeleteComment(ctx context.Context, doer *user_model.User, comment *issues_model.Comment) { @@ -64,7 +64,7 @@ func (r *indexerNotifier) DeleteComment(ctx context.Context, doer *user_model.Us log.Error("LoadIssue: %v", err) return } - issue_indexer.UpdateIssueIndexer(comment.Issue.ID) + issue_indexer.UpdateIssueIndexer(ctx, comment.Issue.ID) } func (r *indexerNotifier) DeleteRepository(ctx context.Context, doer *user_model.User, repo *repo_model.Repository) { @@ -120,13 +120,13 @@ func (r *indexerNotifier) ChangeDefaultBranch(ctx context.Context, repo *repo_mo } func (r *indexerNotifier) IssueChangeContent(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, oldContent string) { - issue_indexer.UpdateIssueIndexer(issue.ID) + issue_indexer.UpdateIssueIndexer(ctx, issue.ID) } func (r *indexerNotifier) IssueChangeTitle(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, oldTitle string) { - issue_indexer.UpdateIssueIndexer(issue.ID) + issue_indexer.UpdateIssueIndexer(ctx, issue.ID) } func (r *indexerNotifier) IssueChangeRef(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, oldRef string) { - issue_indexer.UpdateIssueIndexer(issue.ID) + issue_indexer.UpdateIssueIndexer(ctx, issue.ID) } |