Limit parallel requests to 10
Set a limit of 10 parallel goroutines to prevent flooding the github API. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
0eedd5b3b1
commit
03c28d8598
1 changed files with 1 additions and 0 deletions
|
|
@ -655,6 +655,7 @@ func (r *basePoolManager) reapTimedOutRunners(runners []forgeRunner) error {
|
|||
func (r *basePoolManager) cleanupOrphanedGithubRunners(runners []forgeRunner) error {
|
||||
poolInstanceCache := map[string][]commonParams.ProviderInstance{}
|
||||
g, ctx := errgroup.WithContext(r.ctx)
|
||||
g.SetLimit(10)
|
||||
for _, runner := range runners {
|
||||
if !isManagedRunner(labelsFromRunner(runner), r.controllerInfo.ControllerID.String()) {
|
||||
slog.DebugContext(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue