class AsyncHandler(tornado.web.RequestHandler):
@tornado.web.asynchronous
def get(self):
tasks.sleep.apply_async(args=[5], callback=self.on_result)
def on_result(self, response):
self.write(str(response.result))
self.finish()
raise error :
raise TypeError(repr(o) + " is not JSON serializable")
TypeError: <bound method AsyncHandler.on_result
of <__main__.AsyncHandler object at 0x10e7a19d0>> is not JSON serializable
The broker and backends all use redis, I just copied from https://github.com/mher/tornado-celery
When I use amqp broker and redis backends it works well, but not when using the redis broker. Is this because tornado async does not support redis broker?