Update asyncio
This commit is contained in:
parent
f2575e04fb
commit
704adf6fe8
@ -33,9 +33,8 @@ class BaseMapper:
|
||||
self.db.commit()
|
||||
return result
|
||||
|
||||
result = _execute()
|
||||
async with self.semaphore:
|
||||
return _execute()
|
||||
return await asyncio.to_thread(_execute)
|
||||
|
||||
async def new(self):
|
||||
return self.model_class(mapper=self, app=self.app)
|
||||
|
Loading…
Reference in New Issue
Block a user