fix(пополнение): сводка с пополнениями не считается тихой, текст тревоги НПД читаем
Крон шлёт сводку с --quiet-ok и решает по флагу quiet, который пополнений не видел: день одних пополнений молча не отправлялся. В тревоге НПД «2,4 млн» превращалось в «2 4 млн». Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+4
-1
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user