def main(): controller.initialize() app = TornadoApp() http_server = tornado.httpserver.HTTPServer(app) http_server.listen(options.port) print "Tornado server started on port %s" % options.port if settings["debug"]: def f(): controller.shutdown() reload(controller) autoreload.add_reload_hook(f) try: IOLoop.instance().start() finally: controller.shutdown()
def f(): controller.shutdown() reload(controller)
def keyboard_shutdown(signum, frame): controller.shutdown() IOLoop.instance().stop()
def tearDown(self): AsyncHTTPTestCase.tearDown(self) controller.shutdown()
def tearDown(self): controller.shutdown()
def _shutdown(self): """ Fully stops the archiver and this server """ controller.shutdown() self.win("Shutting down right away") ioloop = IOLoop.instance() ioloop.stop()