Very small alterations, switched from using start() to pass host/port, to just defining them up front in init. Doesn't make sense to set them in start because we can't start more than once any way. Also, unbroke binaries.

This commit is contained in:
Brian Lamar
2011-06-21 11:25:44 -04:00
parent 99a91caee7
commit 330f470992
4 changed files with 18 additions and 8 deletions

View File

@@ -137,8 +137,9 @@ if __name__ == '__main__':
utils.default_flagfile() utils.default_flagfile()
FLAGS(sys.argv) FLAGS(sys.argv)
logging.setup() logging.setup()
server = wsgi.Server() acp_port = FLAGS.ajax_console_proxy_port
acp = AjaxConsoleProxy() acp = AjaxConsoleProxy()
acp.register_listeners() acp.register_listeners()
server.start(acp, FLAGS.ajax_console_proxy_port, host='0.0.0.0') server = wsgi.Server("AJAX Console Proxy", acp, port=acp_port)
server.start()
server.wait() server.wait()

View File

@@ -93,6 +93,9 @@ if __name__ == '__main__':
with_req = direct.PostParamsMiddleware(with_json) with_req = direct.PostParamsMiddleware(with_json)
with_auth = direct.DelegatedAuthMiddleware(with_req) with_auth = direct.DelegatedAuthMiddleware(with_req)
server = wsgi.Server() server = wsgi.Server("Direct API",
server.start(with_auth, FLAGS.direct_port, host=FLAGS.direct_host) with_auth,
host=FLAGS.direct_host,
port=FLAGS.direct_port)
server.start()
server.wait() server.wait()

View File

@@ -50,6 +50,9 @@ if __name__ == '__main__':
FLAGS(sys.argv) FLAGS(sys.argv)
logging.setup() logging.setup()
router = s3server.S3Application(FLAGS.buckets_path) router = s3server.S3Application(FLAGS.buckets_path)
server = wsgi.Server() server = wsgi.Server("S3 Objectstore",
server.start(router, FLAGS.s3_port, host=FLAGS.s3_host) router,
port=FLAGS.s3_port,
host=FLAGS.s3_host)
server.start()
server.wait() server.wait()

View File

@@ -96,6 +96,9 @@ if __name__ == "__main__":
service.serve() service.serve()
server = wsgi.Server() server = wsgi.Server("VNC Proxy",
server.start(with_auth, FLAGS.vncproxy_port, host=FLAGS.vncproxy_host) with_auth,
host=FLAGS.vncproxy_host,
port=FLAGS.vncproxy_port)
server.start()
server.wait() server.wait()