简体   繁体   中英

Async in connexion (swagger codegen) python server using tornado

If I add @gen.coroutine to request handling method, generated by connexion, it stop working - break connect with the client, does not return anything.

How to use connexion+tornado anyncronously? gen.sleep for example? If I yield gen.sleep in the request handler without @gen.coroutine, it does not wait specified time.

I found the answer. It's not pleasant though..

https://waffle.io/zalando/connexion/cards/57c036758b96c67f0165fb9f

@funseiki ... giving it more though we would need to actually do quite some changes in other parts of the Connexion code to support Tornado async. For now the answer is "not possible". :/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM