feat(пополнение): тревога, когда платёжка трижды подряд не создала платёж
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1170,6 +1170,13 @@ def get_topup_by_provider(provider: str, provider_id: str) -> dict | None:
|
||||
return dict(row) if row else None
|
||||
|
||||
|
||||
def recent_topup_statuses(limit: int) -> list[str]:
|
||||
"""Статусы последних платежей, новые первыми — сторожу серии отказов платёжки."""
|
||||
with _conn() as conn:
|
||||
return [r[0] for r in conn.execute(
|
||||
"SELECT status FROM topups ORDER BY id DESC LIMIT ?", (limit,)).fetchall()]
|
||||
|
||||
|
||||
def count_open_topups_since(username: str, since_ts: float) -> int:
|
||||
with _conn() as conn:
|
||||
return int(conn.execute(
|
||||
|
||||
Reference in New Issue
Block a user