~ubuntu-branches/ubuntu/quantal/nova/quantal-proposed

« back to all changes in this revision

Viewing changes to bin/nova-compute

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2011-01-21 11:48:06 UTC
  • mto: This revision was merged to the branch mainline in revision 9.
  • Revision ID: james.westby@ubuntu.com-20110121114806-v8fvnnl6az4m4ohv
Tags: upstream-2011.1~bzr597
ImportĀ upstreamĀ versionĀ 2011.1~bzr597

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#    License for the specific language governing permissions and limitations
18
18
#    under the License.
19
19
 
20
 
"""
21
 
  Twistd daemon for the nova compute nodes.
22
 
"""
23
 
 
 
20
"""Starter script for Nova Compute."""
 
21
 
 
22
import eventlet
 
23
eventlet.monkey_patch()
 
24
 
 
25
import gettext
24
26
import os
25
27
import sys
26
28
 
32
34
if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')):
33
35
    sys.path.insert(0, possible_topdir)
34
36
 
 
37
gettext.install('nova', unicode=1)
 
38
 
35
39
from nova import service
36
 
from nova import twistd
37
40
from nova import utils
38
41
 
39
 
 
40
42
if __name__ == '__main__':
41
43
    utils.default_flagfile()
42
 
    twistd.serve(__file__)
43
 
 
44
 
if __name__ == '__builtin__':
45
 
    application = service.Service.create()  # pylint: disable=C0103
 
44
    service.serve()
 
45
    service.wait()