Skip to content

Commit

Permalink
fix setting max pool size for concurrent comments pulling (#94)
Browse files Browse the repository at this point in the history
* fix setting max pool size for concurrent comments pulling
  • Loading branch information
atefehmohseni authored and Harness committed Oct 30, 2024
1 parent d13a6f4 commit 8e88885
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/gitexporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ func (e *Exporter) exportCommentsForPRs(

e.Tracer.Start(common.MsgStartCommentsFetch, repo.RepoSlug)
defer e.Tracer.Stop(common.MsgCompleteCommentsFetch, repo.RepoSlug)
taskPool := util.NewTaskPool(ctx, max(maxParallelism, len(prs)))
taskPool := util.NewTaskPool(ctx, min(maxParallelism, len(prs)))
err := taskPool.Start()
if err != nil {
return nil, fmt.Errorf("error starting thread pool: %w", err)
Expand Down

0 comments on commit 8e88885

Please sign in to comment.