stats: add WAU based on activity timestamp.

master
Snakes 2022-06-20 16:33:47 -04:00
parent f6b6997f61
commit f59556cac3
1 changed files with 1 additions and 0 deletions

View File

@ -128,6 +128,7 @@ def stats(site=None):
"total awards": g.db.query(AwardRelationship).count(),
"awards given": g.db.query(AwardRelationship).filter(or_(AwardRelationship.submission_id != None, AwardRelationship.comment_id != None)).count(),
"users who posted, commented, or voted in the past 7 days": len(active_users),
"users online in the past 7 days": g.db.query(User).filter(User.last_active > week).count(),
}
if site == 'rDrama':