From f59556cac3cebada1d5740369e515b7368ad9ef4 Mon Sep 17 00:00:00 2001 From: TLSM Date: Mon, 20 Jun 2022 16:33:47 -0400 Subject: [PATCH] stats: add WAU based on activity timestamp. --- files/helpers/stats.py | 1 + 1 file changed, 1 insertion(+) diff --git a/files/helpers/stats.py b/files/helpers/stats.py index 9000ce336..f642e71ce 100644 --- a/files/helpers/stats.py +++ b/files/helpers/stats.py @@ -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':