Move the sleep?

This commit is contained in:
Joshua Boniface 2018-06-02 00:41:27 -04:00
parent 72f16a97ec
commit 348fa6774e
1 changed files with 1 additions and 1 deletions

View File

@ -14,6 +14,7 @@ class VMInstance:
self.hypervisor = None self.hypervisor = None
self.state = None self.state = None
self.dom = None self.dom = None
sleep(0.5)
# Watch for changes to the hypervisor field in Zookeeper # Watch for changes to the hypervisor field in Zookeeper
@zk.DataWatch(self.zkey + '/hypervisor') @zk.DataWatch(self.zkey + '/hypervisor')
@ -40,7 +41,6 @@ class VMInstance:
if dom == None: if dom == None:
try: try:
sleep(0.5)
self.zk.set(self.zkey + '/status', 'stop'.encode('ascii')) self.zk.set(self.zkey + '/status', 'stop'.encode('ascii'))
except: except:
pass pass