commit | d3b9b7c5c09281d16c954ece47aa0255ae92d45e | [log] [tgz] |
---|---|---|
author | Zvonimir Pavlinovic <zpavlinovic@google.com> | Wed Aug 14 13:35:24 2024 +0000 |
committer | Zvonimir Pavlinovic <zpavlinovic@google.com> | Wed Aug 14 14:46:27 2024 +0000 |
tree | 7f80ac4e755f8677a251e5004a1b431cf85a3663 | |
parent | 8746f57edbc23bb5fae2b5fd3cd8e01a2d738c7d [diff] |
internal/vulndbreqs: use Go instead of TryGo Otherwise, a go routine will be skipped if the limit is reached. Change-Id: Ie5a4d7d31879f549678c00087b60d8904f77f234 Reviewed-on: https://go-review.googlesource.com/c/pkgsite-metrics/+/605435 Reviewed-by: Jonathan Amsterdam <jba@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
diff --git a/internal/vulndbreqs/compute.go b/internal/vulndbreqs/compute.go index e26dbea..b757476 100644 --- a/internal/vulndbreqs/compute.go +++ b/internal/vulndbreqs/compute.go
@@ -252,7 +252,7 @@ g.SetLimit(5) for _, name := range objNames { name := name - g.TryGo(func() error { + g.Go(func() error { select { case <-ctx.Done(): return nil // context cancelled, likely another routine erred