token-storage-refactored
Some checks failed
Deploy on push / type-check (push) Failing after 8s
Deploy on push / deploy (push) Has been skipped

This commit is contained in:
2025-06-02 21:50:58 +03:00
parent cca2f71c59
commit 21d28a0d8b
33 changed files with 2934 additions and 1533 deletions

View File

@@ -202,7 +202,7 @@ json_builder, json_array_builder, json_cast = get_json_builder()
# This function is used for search indexing
async def fetch_all_shouts(session: Session | None = None) -> list[Any]:
def fetch_all_shouts(session: Session | None = None) -> list[Any]:
"""Fetch all published shouts for search indexing with authors preloaded"""
from orm.shout import Shout
@@ -224,7 +224,12 @@ async def fetch_all_shouts(session: Session | None = None) -> list[Any]:
return []
finally:
if close_session:
session.close()
# Подавляем SQLAlchemy deprecated warning для синхронной сессии
import warnings
with warnings.catch_warnings():
warnings.simplefilter("ignore", DeprecationWarning)
session.close()
def get_column_names_without_virtual(model_cls: type[BaseModel]) -> list[str]: