fix(proxy_server.py): don't reconnect prisma if already connected

This commit is contained in:
Krrish Dholakia 2024-01-09 11:38:42 +05:30 committed by ishaan-jaff
parent 9673e6042e
commit 27e52794df
3 changed files with 16 additions and 3 deletions

View file

@ -578,7 +578,8 @@ class PrismaClient:
)
async def connect(self):
try:
await self.db.connect()
if self.db.is_connected() == False:
await self.db.connect()
except Exception as e:
asyncio.create_task(
self.proxy_logging_obj.failure_handler(original_exception=e)