Skip to content

Commit

Permalink
issue #51 - add a bit more debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
jantman committed Jul 9, 2016
1 parent acbcf3b commit c36b2db
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions awslimitchecker/services/ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,14 @@ def _find_usage_spot_instances(self):
for req in res['SpotInstanceRequests']:
if req['State'] in ['open', 'active']:
count += 1
logger.debug('Counting spot instance request %s state=%s',
req['SpotInstanceRequestId'], req['State'])
logger.debug('Counting spot instance request %s state=%s; '
'spot instance count is now %s',
req['SpotInstanceRequestId'], req['State'], count)
else:
logger.debug('NOT counting spot instance request %s state=%s',
req['SpotInstanceRequestId'], req['State'])
logger.debug('Setting "Max spot instance requests per region" limit '
'current usage to: %d', count)
self.limits['Max spot instance requests per region']._add_current_usage(
count,
aws_type='AWS::EC2::SpotInstanceRequest'
Expand Down

0 comments on commit c36b2db

Please sign in to comment.