check any pending vm scheduling on start

This commit is contained in:
ahmadbilalkhalid 2019-07-20 14:50:08 +05:00
parent f078b9b245
commit eb015de8f1

View file

@ -144,8 +144,8 @@ def main(vm_prefix, host_prefix):
host=config("ETCD_HOST"), port=int(config("ETCD_PORT")) host=config("ETCD_HOST"), port=int(config("ETCD_PORT"))
) )
events_iterator = client.watch_prefix(vm_prefix, timeout=10) for events_iterator in [client.get_prefix(vm_prefix),
client.watch_prefix(vm_prefix, timeout=10)]:
for e in events_iterator: for e in events_iterator:
try: try:
e.value = json.loads(e.value) e.value = json.loads(e.value)