File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ def __init__(
5050 self ._session : Optional [aiohttp .ClientSession ] = None
5151 self ._session_lock = asyncio .Lock ()
5252
53- async def _get_session (self ) -> aiohttp .ClientSession :
53+ async def _get_or_create_session (self ) -> aiohttp .ClientSession :
5454 async with self ._session_lock :
5555 if self ._session is None or self ._session .closed :
5656 self ._session = aiohttp .ClientSession ()
@@ -97,7 +97,7 @@ async def _process_row(row: EvaluationRow) -> EvaluationRow:
9797 timeout_init = aiohttp .ClientTimeout (total = 300 )
9898
9999 try :
100- session = await self ._get_session ()
100+ session = await self ._get_or_create_session ()
101101 async with session .post (init_url , json = init_payload .model_dump (), timeout = timeout_init ) as resp :
102102 if resp .status >= 400 :
103103 body = await resp .text ()
You can’t perform that action at this time.
0 commit comments