Just trying to use the async functions of Tornado - I want to invoke a method from my handler but it keeps telling me that it "got an unexpected keyword argument 'callback'".
class MyHandler(tornado.web.RequestHandler):
@asynchronous
@gen.engine
def get(self):
response = yield gen.Task(self.dosomething, 'argument')
self.write(response)
self.finish()
def dosomething(self, myargument):
pass
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…