Ejemplo n.º 1
0
def start_instance(settings):

    app_ctx = AppCTX.get_instance()
    app_ctx.settings = settings
    app_ctx.logger = settings["LOGGER"]

    http_server = tornado.httpserver.HTTPServer(
        setup_app(settings["TORNADO"])
        )
    http_server.listen(settings["TORNADO"]["port"])

    display_server_info(settings)

    try:
        tornado.ioloop.IOLoop.instance().start()
    except KeyboardInterrupt:
        pass

    print "started"
Ejemplo n.º 2
0
 def initialize(self):
     super(BaseHandler, self).initialize()
     #RequestHandler.initialize(self)
     #TODO get this dependecies injected
     app_ctx = AppCTX.get_instance()
     self._logger = app_ctx.logger
Ejemplo n.º 3
0
 def initialize(self):
     super(BaseHandler, self).initialize()
     #RequestHandler.initialize(self)
     #TODO get this dependecies injected
     app_ctx = AppCTX.get_instance()
     self._logger = app_ctx.logger