notifications-stats-todo
All checks were successful
Deploy on push / deploy (push) Successful in 8m16s

This commit is contained in:
2025-09-16 12:52:14 +03:00
parent 24a1f181b9
commit 634cec657c
4 changed files with 7 additions and 6 deletions

View File

@@ -385,7 +385,7 @@ def require_role(role: str) -> Callable:
if not info or not hasattr(info, "context"):
raise RBACError("GraphQL info context не найден")
user_roles, community_id = get_user_roles_from_context(info)
user_roles, _community_id = get_user_roles_from_context(info)
if role not in user_roles:
raise RBACError("Требуется роль в сообществе", role)

View File

@@ -216,7 +216,7 @@ async def unfollow(
logger.error(f"Неверный тип для отписки: {what}")
return {"error": "invalid unfollow type"}
entity_class, follower_class, get_cached_follows_method, cache_method = entity_classes[what]
entity_class, follower_class, get_cached_follows_method, _cache_method = entity_classes[what]
entity_type = what.lower()
follows: list[dict[str, Any]] = []

View File

@@ -105,7 +105,8 @@ def get_notifications_grouped(author_id: int, after: int = 0, limit: int = 10, o
authors: List[NotificationAuthor], # List of authors involved in the thread.
}
"""
total, unread, notifications = query_notifications(author_id, after)
# TODO: use all stats
_total, _unread, notifications = query_notifications(author_id, after)
groups_by_thread = {}
groups_amount = 0

6
uv.lock generated
View File

@@ -500,12 +500,12 @@ requires-dist = [
{ name = "pyjwt", specifier = ">=2.10" },
{ name = "redis", extras = ["hiredis"] },
{ name = "scikit-learn", specifier = ">=1.7.0" },
{ name = "sentence-transformers", specifier = ">=2.2.0" },
{ name = "sentence-transformers" },
{ name = "sentry-sdk", extras = ["starlette", "sqlalchemy"] },
{ name = "sqlalchemy", specifier = ">=2.0.0" },
{ name = "starlette" },
{ name = "torch", specifier = ">=2.1.0" },
{ name = "transformers", specifier = ">=4.56.0" },
{ name = "torch" },
{ name = "transformers" },
{ name = "types-authlib" },
{ name = "types-orjson" },
{ name = "types-pyjwt" },