From: Justin Wind Date: Thu, 14 Sep 2017 20:37:00 +0000 (-0700) Subject: sqs-action.py is slightly more verbose X-Git-Url: http://git.squeep.com/?p=awsible;a=commitdiff_plain;h=aeae07ba0caa3d5b06198f7b981d2842ebb5d906 sqs-action.py is slightly more verbose --- diff --git a/sqs-action.py b/sqs-action.py index a71d01d..e2b8c64 100755 --- a/sqs-action.py +++ b/sqs-action.py @@ -55,23 +55,23 @@ def processMessage(message): ASGName = data['AutoScalingGroupName'] InstanceId = data['EC2InstanceId'] except: - logging.debug('unparsable message %r', message.body) + logging.warning('unparsable message %r', message.body) message.delete() else: if event == 'autoscaling:EC2_INSTANCE_LAUNCH': try: instanceState = ec2r.Instance(InstanceId).state['Name'] except: - logging.debug('instance %s does not exist', InstanceId) + logging.warning('instance %s does not exist', InstanceId) message.change_visibility(VisibilityTimeout=60 * 2) else: if instanceState == 'running': handleEvent(message, event, ASGName, InstanceId) else: - logging.debug('instance %s is in state %s, will try again', InstanceId, instanceState) + logging.warning('instance %s is in state %s, will try again', InstanceId, instanceState) message.change_visibility(VisibilityTimeout=60 * 2) else: - logging.debug('nothing to do for event %r', data) + logging.warning('nothing to do for event %r', data) message.delete()