Run the server with asyncio.run(...) #6517
-
Is your feature request related to a problem?I cannot run other async tasks alongside the server. async def main():
await asyncio.gather(websocket_server(), background_task())
asyncio.run(main()) Is this possible with aiohttp? Describe the solution you'd likeI would like to run the aiohttp server alongside other async tasks similar to the example above. Describe alternatives you've consideredFound Related componentServer Additional contextNo response Code of Conduct
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
You can use https://docs.aiohttp.org/en/stable/web_advanced.html#aiohttp-web-app-runners for starting the application without |
Beta Was this translation helpful? Give feedback.
-
Thank you, the code from aiohttp-web-app-runners worked well. |
Beta Was this translation helpful? Give feedback.
You can use https://docs.aiohttp.org/en/stable/web_advanced.html#aiohttp-web-app-runners for starting the application without
run_app
call.