class Global(RequestHandler):
async def post(self):
self._auto_finish = False #关闭长链接
IOLoop.current().spawn_callback(self.do_find)
async def do_find(self):
if self.settings["admin"] != 1:
cursor = db.find(projection={'_id': 0})
documents = [document for document in (await cursor.to_list(length=100))]
print(documents)
self.write("ok")
self.finish()
tornado==6.0.4 motor==2.1 这是我根据motor官网写的代码。开启长链接时,同步查询电机编程;当长链接关闭时,电机可以异步,但不能返回任何值。响应状态码是200。请问,龙卷风和马达是怎么用的?