Skip to content

Use aiohttp for lava-worker HTTP requests

Igor Ponomarev requested to merge lava-worker-use-aiohttp-for-http into master

aiohttp is already used for the websocket. Replace existing blocking requests calls with aiohttp to avoid blocking event loop.

Use a single aiohttp.ClientSession for between the main loop and the websocket loop. This will efficiently reuse the TCP connections.

aiohttp uses an async context manager per request to manage resources. Make helper functions always return the Response dataclass to simplify transition.

Edited by Igor Ponomarev

Merge request reports