2 Commits

Author SHA1 Message Date
798447760f 🐛 Let the back-end fails when it fails to connect to the database 2024-02-15 22:28:19 +01:00
d9e35a4c8b ⬆️ Bump python-lsp-ruff from 1.0.5 to 2.1.0 2024-02-15 22:08:43 +01:00
2 changed files with 3 additions and 6 deletions

View File

@@ -1,10 +1,7 @@
from asyncio import sleep
from logging import getLogger
from typing import Annotated, AsyncIterator
from fastapi import Depends
from opentelemetry.instrumentation.sqlalchemy import SQLAlchemyInstrumentor
from sqlalchemy import text
from sqlalchemy.exc import OperationalError, SQLAlchemyError
from sqlalchemy.ext.asyncio import (
async_sessionmaker,
@@ -16,6 +13,7 @@ from sqlalchemy.ext.asyncio import (
from .base_class import Base
from ..settings import DatabaseSettings
logger = getLogger(__name__)
@@ -30,8 +28,7 @@ class Database:
except (SQLAlchemyError, AttributeError) as e:
logger.exception(e)
return None
raise
# TODO: Preserve UserLastStopSearchResults table from drop.
async def connect(

View File

@@ -60,7 +60,7 @@ types-aiofiles = "^22.1.0.2"
wrapt = "^1.14.1"
pydocstyle = "^6.2.2"
dill = "^0.3.6"
python-lsp-ruff = "^1.0.5"
python-lsp-ruff = "^2.1.0"
python-lsp-server = "^1.7.1"
autopep8 = "^2.0.1"
pyflakes = "^3.0.1"