mirror of
https://github.com/simple-login/app.git
synced 2024-11-10 17:35:27 +08:00
fix cron
This commit is contained in:
parent
92acf352b6
commit
8eed6008f3
1 changed files with 5 additions and 1 deletions
6
cron.py
6
cron.py
|
@ -421,7 +421,11 @@ def stats():
|
|||
compute_metrics()
|
||||
|
||||
stats_today = compute_metric2(arrow.now())
|
||||
stats_yesterday = compute_metric2(arrow.now().shift(days=-1))
|
||||
stats_yesterday = (
|
||||
Metric2.query.filter(Metric2.date < stats_today.date)
|
||||
.order_by(Metric2.date.desc())
|
||||
.first()
|
||||
)
|
||||
|
||||
nb_user_increase = increase_percent(stats_yesterday.nb_user, stats_today.nb_user)
|
||||
nb_alias_increase = increase_percent(stats_yesterday.nb_alias, stats_today.nb_alias)
|
||||
|
|
Loading…
Reference in a new issue