File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
import asyncio
2
2
import logging
3
- import functools
4
3
from typing import (
5
4
Callable ,
6
5
Optional ,
@@ -61,7 +60,8 @@ async def acquire(self) -> QuerySession:
61
60
done , _ = await asyncio .wait ((queue_get , task_stop ), return_when = asyncio .FIRST_COMPLETED )
62
61
if task_stop in done :
63
62
queue_get .cancel ()
64
- return await self ._create_new_session ()
63
+ raise RuntimeError ("An attempt to take session from closed session pool." )
64
+
65
65
task_stop .cancel ()
66
66
session = queue_get .result ()
67
67
@@ -163,7 +163,7 @@ def __del__(self):
163
163
if self ._should_stop .is_set () or self ._loop .is_closed ():
164
164
return
165
165
166
- self ._loop .call_soon (functools . partial ( self .stop ) )
166
+ self ._loop .call_soon (self .stop )
167
167
168
168
169
169
class SimpleQuerySessionCheckoutAsync :
You can’t perform that action at this time.
0 commit comments