Skip to content

Commit

Permalink
feat(provider/aws): retrieve 150 scaling activities instead of 30
Browse files Browse the repository at this point in the history
  • Loading branch information
anotherchrisberry committed Mar 3, 2017
1 parent 0690ff4 commit eec3be5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class AmazonClusterController {
@Autowired
AmazonClientProvider amazonClientProvider

final static int MAX_SCALING_ACTIVITIES = 30
final static int MAX_SCALING_ACTIVITIES = 500

@RequestMapping(value = "/scalingActivities", method = RequestMethod.GET)
ResponseEntity getScalingActivities(@PathVariable String account, @PathVariable String serverGroupName, @RequestParam(value = "region", required = true) String region) {
Expand All @@ -50,7 +50,7 @@ class AmazonClusterController {
List<Activity> scalingActivities = []
while (scalingActivities.size() < MAX_SCALING_ACTIVITIES) {
scalingActivities.addAll response.activities
if (response.nextToken) {
if (response.nextToken && scalingActivities.size() < MAX_SCALING_ACTIVITIES) {
response = autoScaling.describeScalingActivities(request.withNextToken(response.nextToken))
} else {
break
Expand Down

0 comments on commit eec3be5

Please sign in to comment.