fix(пополнение): сводка с пополнениями не считается тихой, текст тревоги НПД читаем

Крон шлёт сводку с --quiet-ok и решает по флагу quiet, который пополнений не видел:
день одних пополнений молча не отправлялся. В тревоге НПД «2,4 млн» превращалось в «2 4 млн».

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
anor
2026-10-28 16:22:39 +10:00
co-authored by Claude Opus 5.5
parent f0f10372e2
commit e4bf3eb9f2
3 changed files with 25 additions and 3 deletions
+4 -1
View File
@@ -70,8 +70,11 @@ def collect(hours: int = 24) -> dict:
"broken_users": sorted({r[0] for r in broken}),
}
out["topups"] = _topups(since)
t = out["topups"]
# Cron sends with --quiet-ok and decides by this flag: a day of payments is not quiet.
out["quiet"] = (out["broken_runs"] == 0 and out["masked_errors"] == 0
and out["feedback"] == 0)
and out["feedback"] == 0
and not (t["count"] or t["refunds"] or t["unpaid"]))
return out