Update asyncio

This commit is contained in:
retoor 2025-09-30 17:36:22 +02:00
parent f2575e04fb
commit 704adf6fe8

View File

@ -33,9 +33,8 @@ class BaseMapper:
self.db.commit() self.db.commit()
return result return result
result = _execute()
async with self.semaphore: async with self.semaphore:
return _execute() return await asyncio.to_thread(_execute)
async def new(self): async def new(self):
return self.model_class(mapper=self, app=self.app) return self.model_class(mapper=self, app=self.app)