summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorJustin Santa Barbara <justin@fathomdb.com>2011-02-22 17:58:01 -0800
committerJustin Santa Barbara <justin@fathomdb.com>2011-02-22 17:58:01 -0800
commite37e7b91a9fb5664ad50c1ff38e95f1a2d655c06 (patch)
tree3b078ca449be7b64703510ec2d8ae4a403b1a699 /nova
parent79f6c437b486262bab3faacb59197a5cae30b2bd (diff)
Support service-like wait behaviour for API service
Diffstat (limited to 'nova')
-rw-r--r--nova/apiservice.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/nova/apiservice.py b/nova/apiservice.py
index 1914b9e59..14239f196 100644
--- a/nova/apiservice.py
+++ b/nova/apiservice.py
@@ -60,7 +60,7 @@ def _run_app(paste_config_file):
server = wsgi.Server()
for app in apps:
server.start(*app)
- server.wait()
+ return server
class ApiService(object):
@@ -68,9 +68,13 @@ class ApiService(object):
def __init__(self, conf):
self.conf = conf
+ self.wsgi_app = None
def start(self):
- _run_app(self.conf)
+ self.wsgi_app = _run_app(self.conf)
+
+ def wait(self):
+ self.wsgi_app.wait()
@staticmethod
def create():