make nova binaries use eventlet

This commit is contained in:
Andy Smith
2010-12-09 14:36:23 -08:00
parent 0e49f9368e
commit 4f780f9e7a
7 changed files with 33 additions and 27 deletions

View File

@@ -21,6 +21,9 @@
Twistd daemon for the nova volume nodes.
"""
import eventlet
eventlet.monkey_patch()
import os
import sys
@@ -32,14 +35,8 @@ possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')):
sys.path.insert(0, possible_topdir)
from nova import service
from nova import twistd
from nova import utils
from nova import service_eventlet
if __name__ == '__main__':
utils.default_flagfile()
twistd.serve(__file__)
if __name__ == '__builtin__':
application = service.Service.create() # pylint: disable-msg=C0103
service_eventlet.serve()
service_eventlet.wait()