I am trying to run QUART and NATS client in one application. Using this code for nats part [https://github.com/nats-io/stan.py/issues/12#issuecomment-400865266][1]
My main function contains:
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
loop.run_until_complete(serve(app, config))
loop.run_until_complete(run_nats(loop))
loop.close()
But it just runs QUART and nats is blocked. How can I solve this?
Information:
- Python 3.9
- asyncio-nats-client 0.11.4
- Quart 0.11.4