(request_config: dict, vec_model: VectorizeModel)
| 38 | self.write(response_body) |
| 39 | |
| 40 | def StartVecModelHandler(request_config: dict, vec_model: VectorizeModel): |
| 41 | # 启动TestClass服务的进程 |
| 42 | # 注:如果是同端口,只是不同的url路径,则直接都放在handler_routes里面即可 |
| 43 | # 注:test_class需要在外面初始化后再传进来,而不能在initialize里面加载,initialize是每次请求都会执行一遍,例如知识问答的索引更新,肯定不能在这里面修改 |
| 44 | handler_routes = [(request_config["url_suffix"], VecModelHandler, {"vec_model":vec_model})] |
| 45 | app = Application(handlers=handler_routes) |
| 46 | http_server = HTTPServer(app) |
| 47 | http_server.listen(request_config["port"]) |
| 48 | tornado.ioloop.IOLoop.current().start() |
nothing calls this directly
no outgoing calls
no test coverage detected