fix: wrap synchronous _execute call in asyncio.to_thread for non-blocking mapper execution

This commit is contained in:
2025-09-30 15:36:22 +00:00
parent 0a05da7067
commit 497cc0b9f7
+1 -2
View File
@@ -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)