~jaypipes/+junk/creiht-paste-deploy

« back to all changes in this revision

Viewing changes to bin/parallax-server

  • Committer: Tarmac
  • Author(s): Rick Harris
  • Date: 2010-12-09 16:07:00 UTC
  • mfrom: (21.1.1 fix-epoll)
  • Revision ID: tarmac-20101209160700-krl4ftmbx24ehghs
Moving imports into main which will only be executed after we daemonize thus avoiding the premature initialization of epoll.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
from glance.common import flags
36
36
from glance.common import utils
37
37
from glance.common import server
38
 
from glance.common import wsgi
39
 
from glance.parallax import controllers
40
38
 
41
39
 
42
40
FLAGS = flags.FLAGS
43
 
# TODO(sirp): ensure no conflicts in port selection
44
41
flags.DEFINE_integer('parallax_port', 9191, 'Parallax port')
45
42
 
46
43
def main(_args):
 
44
    # NOTE(sirp): importing in main so that eventlet is imported AFTER daemonization
 
45
    # see https://bugs.launchpad.net/bugs/687661
 
46
    from glance.common import wsgi
 
47
    from glance.parallax import controllers
47
48
    wsgi.run_server(controllers.API(), FLAGS.parallax_port)
48
49
 
49
50
if __name__ == '__main__':