improve bounce report
This commit is contained in:
parent
ef5670b1cf
commit
6468f7c8a5
6
cron.py
6
cron.py
|
@ -344,7 +344,7 @@ def all_bounce_report() -> str:
|
||||||
```
|
```
|
||||||
|
|
||||||
"""
|
"""
|
||||||
res = ""
|
res = "\n\nBounce detail report:\n"
|
||||||
min_dt = arrow.now().shift(days=-1)
|
min_dt = arrow.now().shift(days=-1)
|
||||||
query = (
|
query = (
|
||||||
Session.query(Bounce.email, func.count(Bounce.id).label("nb_bounce"))
|
Session.query(Bounce.email, func.count(Bounce.id).label("nb_bounce"))
|
||||||
|
@ -472,11 +472,11 @@ nb_referred_user_upgrade: {stats_today.nb_referred_user_paid} - {increase_percen
|
||||||
Alias creation report: <br>
|
Alias creation report: <br>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
html += all_bounce_report().replace("\n", "<br>")
|
|
||||||
|
|
||||||
for email, nb_alias, date in alias_creation_report():
|
for email, nb_alias, date in alias_creation_report():
|
||||||
html += f"{email}, {date}: {nb_alias} <br>"
|
html += f"{email}, {date}: {nb_alias} <br>"
|
||||||
|
|
||||||
|
html += all_bounce_report().replace("\n", "<br>")
|
||||||
|
|
||||||
LOG.d("report email: %s", html)
|
LOG.d("report email: %s", html)
|
||||||
|
|
||||||
send_email(
|
send_email(
|
||||||
|
|
Loading…
Reference in a new issue