Commit eee43f57 by e0d

bad refactor

parent 56a4ef6e
......@@ -80,6 +80,8 @@ class LifecycleHandler:
self.continue_lifecycle(asg, token, self.hook)
if not self.dry_run:
logging.info("Deleting message with body {message}".format(message=as_message))
self.sqs_con.delete_message(queue, sqs_message)
else:
......@@ -104,7 +106,7 @@ class LifecycleHandler:
def record_lifecycle_action_heartbeat(self, asg, token, hook):
command = self.get_base_cli_command + "autoscaling record-lifecycle-action-heartbeat " \
command = self.base_cli_command + "autoscaling record-lifecycle-action-heartbeat " \
"--lifecycle-hook-name {hook} " \
"--auto-scaling-group-name {asg} " \
"--lifecycle-action-token {token}".format(
......@@ -113,7 +115,7 @@ class LifecycleHandler:
self.run_subprocess_command(command, self.dry_run)
def continue_lifecycle(self, asg, token, hook):
command = self.get_base_cli_command + "autoscaling complete-lifecycle-action --lifecycle-hook-name {hook} " \
command = self.base_cli_command + "autoscaling complete-lifecycle-action --lifecycle-hook-name {hook} " \
"--auto-scaling-group-name {asg} --lifecycle-action-token {token} --lifecycle-action-result " \
"CONTINUE".format(
hook=hook, asg=asg, token=token)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment