check any pending vm operation on start

This commit is contained in:
ahmadbilalkhalid 2019-07-20 14:51:10 +05:00
parent b021d63a3e
commit b9348394f1
1 changed files with 60 additions and 61 deletions

View File

@ -212,9 +212,8 @@ def main():
atexit.register(goodbye, host=host)
events = client.watch_prefix("/v1/vm/", timeout=10)
# events = client.get_prefix("/v1/vm/")
for events_iterator in [client.get_prefix("/v1/vm/"),
client.watch_prefix("/v1/vm/", timeout=10)]:
for e in events:
try:
e.value = json.loads(e.value)