aiohttp in 'async with' along with existing websocket app #7926
-
Hello, I'm trying to add a simple
This tuple yielded from
...where
Can anyone offer any advice on how to mix a Thanks in advance for any advice... |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Yes, don't use private, undocumented functions which we'll break later. Instead, either create an aiohttp application that runs the other parts of your application in cleanup_ctx as per the documentation: |
Beta Was this translation helpful? Give feedback.
-
Thanks very much for the reply! The app runner works great. |
Beta Was this translation helpful? Give feedback.
Yes, don't use private, undocumented functions which we'll break later.
Instead, either create an aiohttp application that runs the other parts of your application in cleanup_ctx as per the documentation:
https://docs.aiohttp.org/en/stable/web_advanced.html#complex-applications
Or use the app runners:
https://docs.aiohttp.org/en/stable/web_advanced.html#application-runners