def main():
tornado.options.parse_command_line()
print "ws_rpc main is running, exit with ctrl+c"
logging.info("creating application")
app = create_app()
logging.info("creating server")
server = create_server(app)
logging.info("starting ioloop thread")
thread = threading.Thread(target=start_ioloop)
thread.start()
try:
while(True):
time.sleep(1)
except KeyboardInterrupt:
server.stop()
stop_ioloop()
thread.join()
评论列表
文章目录