Move the sleep?
This commit is contained in:
parent
72f16a97ec
commit
348fa6774e
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue