-
-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Limit number of goroutines for GetMetricData calls
The CloudWatch client already limits the number of concurrent requests to GetMetricData API via the `-cloudwatch-concurrency` flag, however in discovery jobs there's no limit to how many goroutines can be spawn at the same time and get blocked waiting for the client to be available. With this change, we use an errgroup to block adding goroutines to handle GetMetricData partitions until the client is actually available.
- Loading branch information
1 parent
ba183dd
commit 96a0117
Showing
2 changed files
with
36 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters