Skip to content

Commit

Permalink
fix log
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyangc3 committed Dec 5, 2017
1 parent d8495cf commit 88ead18
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions zstack/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@
#
# destroy_vm_event.success -> inactive vm in jump
#
# recover_vm_event.success -> active vm in jump
#
# expunge_vm_event.success ->
# 1 get vm inventory from redis
# 1 get vm inventory from redis
# 2 delete vm in jump
# 3 if delete ok, delete vm inventory from redis

# set logger
logger = logging.getLogger()
Expand Down Expand Up @@ -259,7 +262,7 @@ def on_api_event(self, body, message):
if vm_uuid is not None and body["success"]:
inventory = redis_vm_get(vm_uuid)
if inventory is None:
logger.info('expunge_vm: vmUuid {} not in redis {}'.format(vm_uuid, vm_inventory_name))
logger.info('expunge_vm: vmUuid {} not in redis'.format(vm_uuid))
return message.ack()

_, hostname, ip = parse(json.loads(inventory.decode('utf-8')))
Expand Down

0 comments on commit 88ead18

Please sign in to comment.