projects
/
awsible
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3ab1c9f
)
sqs-action.py is slightly more verbose
author
Justin Wind
<j.wind@partner.samsung.com>
Thu, 14 Sep 2017 20:37:00 +0000
(13:37 -0700)
committer
Justin Wind
<j.wind@partner.samsung.com>
Thu, 14 Sep 2017 20:37:00 +0000
(13:37 -0700)
sqs-action.py
patch
|
blob
|
history
diff --git
a/sqs-action.py
b/sqs-action.py
index a71d01d003620f8817793737bf6372d61758728c..e2b8c6431eb7a574e79bb342ef04d17cb70aa7d9 100755
(executable)
--- a/
sqs-action.py
+++ b/
sqs-action.py
@@
-55,23
+55,23
@@
def processMessage(message):
ASGName = data['AutoScalingGroupName']
InstanceId = data['EC2InstanceId']
except:
ASGName = data['AutoScalingGroupName']
InstanceId = data['EC2InstanceId']
except:
- logging.
debu
g('unparsable message %r', message.body)
+ logging.
warnin
g('unparsable message %r', message.body)
message.delete()
else:
if event == 'autoscaling:EC2_INSTANCE_LAUNCH':
try:
instanceState = ec2r.Instance(InstanceId).state['Name']
except:
message.delete()
else:
if event == 'autoscaling:EC2_INSTANCE_LAUNCH':
try:
instanceState = ec2r.Instance(InstanceId).state['Name']
except:
- logging.
debu
g('instance %s does not exist', InstanceId)
+ logging.
warnin
g('instance %s does not exist', InstanceId)
message.change_visibility(VisibilityTimeout=60 * 2)
else:
if instanceState == 'running':
handleEvent(message, event, ASGName, InstanceId)
else:
message.change_visibility(VisibilityTimeout=60 * 2)
else:
if instanceState == 'running':
handleEvent(message, event, ASGName, InstanceId)
else:
- logging.
debu
g('instance %s is in state %s, will try again', InstanceId, instanceState)
+ logging.
warnin
g('instance %s is in state %s, will try again', InstanceId, instanceState)
message.change_visibility(VisibilityTimeout=60 * 2)
else:
message.change_visibility(VisibilityTimeout=60 * 2)
else:
- logging.
debu
g('nothing to do for event %r', data)
+ logging.
warnin
g('nothing to do for event %r', data)
message.delete()
message.delete()