From 99cfa433cbdf4cd9c139a91f2f8afa63bf5adf08 Mon Sep 17 00:00:00 2001 From: Adam Shedivy Date: Mon, 9 Sep 2024 17:09:40 -0500 Subject: [PATCH] await to_thread in connection --- mapepire_python/asyncio/connection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mapepire_python/asyncio/connection.py b/mapepire_python/asyncio/connection.py index 969e0b8..50371ab 100644 --- a/mapepire_python/asyncio/connection.py +++ b/mapepire_python/asyncio/connection.py @@ -75,7 +75,7 @@ async def executescript(self, script: SQLQuery) -> AsyncCursor: return await self.execute(script) async def commit(self) -> None: - to_thread(self._connection.commit) + await to_thread(self._connection.commit) async def rollback(self) -> None: - to_thread(self._connection.rollback) + await to_thread(self._connection.rollback)