Skip to content

Commit

Permalink
add extra waiting times for high batch sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
wardviaene committed Feb 15, 2022
1 parent dabfdce commit 4ad9683
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions autoscaling.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,11 @@ func (a *Autoscaling) getAutoscalingInstanceHealth(autoScalingGroupName string)
autoscalingLogger.Errorf(err.Error())
}
}

if len(instanceIdsSlice) > batchSize {
autoscalingLogger.Infof("Sleeping 10s to avoid ratelimiting (instance size: %d)", len(instanceIdsSlice))
time.Sleep(10 * time.Second)
}
}

// get IPs
Expand Down

0 comments on commit 4ad9683

Please sign in to comment.