summaryrefslogtreecommitdiffstats
path: root/nova/utils.py
diff options
context:
space:
mode:
authorChris Behrens <cbehrens@codestud.com>2011-05-13 16:55:18 +0000
committerTarmac <>2011-05-13 16:55:18 +0000
commit715d7ae9a3dc3804b0bcea0830ebd0f1322e16fe (patch)
tree7780f3b1f490b679ab4e497340bfbe62d7654f18 /nova/utils.py
parent0805521c79f934ba54f839be64a2c43ed177612d (diff)
parent3f247a628c954d5d4d97def6e6a2f889ab7ec7e3 (diff)
downloadnova-715d7ae9a3dc3804b0bcea0830ebd0f1322e16fe.tar.gz
nova-715d7ae9a3dc3804b0bcea0830ebd0f1322e16fe.tar.xz
nova-715d7ae9a3dc3804b0bcea0830ebd0f1322e16fe.zip
XenAPI was not implemented to allow for multiple simultaneous XenAPI requests. A single XenAPIConnection (and thus XenAPISession) is used for all queries. XenAPISession's wait_for_task method would set a self.loop = for looping calls to _poll_task until task completion. Subsequent (parallel) calls to wait_for_task for another query would overwrite this. XenAPISession._poll_task was pulled into the XenAPISession.wait_for_task method to avoid having to store self.loop.
Diffstat (limited to 'nova/utils.py')
-rw-r--r--nova/utils.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/nova/utils.py b/nova/utils.py
index b55e83e5a..0c469b1de 100644
--- a/nova/utils.py
+++ b/nova/utils.py
@@ -462,6 +462,8 @@ class LoopingCall(object):
try:
while self._running:
self.f(*self.args, **self.kw)
+ if not self._running:
+ break
greenthread.sleep(interval)
except LoopingCallDone, e:
self.stop()