Tornado V6 Seems To Have Dropped Tornado.web.asynchronous Coroutine. Any Different Way Of Fixing This In Code?
Migrated torando v5.1 to v6. but asynchronous coroutine seems to have removed. Any suggestions for its fix? Migrating the project from 2.7 to 3.6, at the same time moving tornado f
Solution 1:
The @asynchronous
handler was deprecated in 5.1 and removed in 6.0. Instead of using @asynchronous
and callbacks, you should use coroutines (using either @tornado.gen.coroutine
or async def
).
Note that a few older code examples used to have both @asynchronous
and @coroutine
on the same method. Putting @asynchronous
on a coroutine doesn't do anything, so if you happen to be using both decorators you can just remove @asynchronous
without changing anything else.
Post a Comment for "Tornado V6 Seems To Have Dropped Tornado.web.asynchronous Coroutine. Any Different Way Of Fixing This In Code?"