Open maximusunc opened 3 months ago
switched to asyncio.
It looks like the stress_utilities block still uses the ThreadPoolExecutor
Also, I think aiohttp
is not needed. httpx
has plenty of exception types you can use: https://www.python-httpx.org/exceptions/
I'm not sure a ThreadPoolExecutor is necessarily the right tool for what we want to do here. Each query doesn't really need its own thread as we aren't doing anything super CPU intensive, and we will arguably want to send more than 30 or so queries at a time. I find this answer to be very informative about the differences: https://stackoverflow.com/a/61360215
I would like to advocate for using asyncio as I think it's more suited for this task, as well as being cleaner in code (no literal parsing of the html response)