Wrong imports whupps

This commit is contained in:
Jonas Linter
2025-11-13 09:15:56 +01:00
parent 0d13f903a0
commit e161508a61

View File

@@ -4,7 +4,7 @@ import os
from typing import Any, AsyncGenerator, Callable, TypeVar from typing import Any, AsyncGenerator, Callable, TypeVar
from sqlalchemy import Boolean, Column, Date, DateTime, ForeignKey, Integer, String from sqlalchemy import Boolean, Column, Date, DateTime, ForeignKey, Integer, String
from sqlalchemy.exc import DBAPIError, InternalServerError from sqlalchemy.exc import DBAPIError
from sqlalchemy.ext.asyncio import AsyncEngine, AsyncSession, create_async_engine, async_sessionmaker from sqlalchemy.ext.asyncio import AsyncEngine, AsyncSession, create_async_engine, async_sessionmaker
from sqlalchemy.orm import declarative_base, relationship from sqlalchemy.orm import declarative_base, relationship
@@ -146,7 +146,7 @@ class ResilientAsyncSession:
try: try:
async with self.async_sessionmaker() as session: async with self.async_sessionmaker() as session:
return await func(session, *args, **kwargs) return await func(session, *args, **kwargs)
except (InternalServerError, DBAPIError) as e: except DBAPIError as e:
last_error = e last_error = e
error_msg = str(e).lower() error_msg = str(e).lower()