reorganizing the menu, reissuing the key, improving statistics, and more

This commit is contained in:
Vladless
2025-03-28 17:44:14 +03:00
parent f1841caea7
commit 4fb13a089a
14 changed files with 553 additions and 138 deletions
+8
View File
@@ -415,6 +415,14 @@ async def store_key(
raise
async def get_clusters(session) -> list[str]:
"""
Получает список уникальных имён кластеров из таблицы servers.
"""
rows = await session.fetch("SELECT DISTINCT cluster_name FROM servers ORDER BY cluster_name")
return [row["cluster_name"] for row in rows]
async def get_keys(tg_id: int, session: Any):
"""
Получает список ключей для указанного пользователя.