From 17038e31da909f08a7550e08ad58fe45308c8deb Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 2 Nov 2022 06:59:23 +0200 Subject: [PATCH] remove 2 useless stats that took 3 and 9 seconds respectively --- files/helpers/stats.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/files/helpers/stats.py b/files/helpers/stats.py index 5362d2b23..fc5845c7d 100644 --- a/files/helpers/stats.py +++ b/files/helpers/stats.py @@ -119,9 +119,7 @@ def stats(site=None): "deleted comments (by author)": g.db.query(Comment).filter(Comment.deleted_utc > 0).count(), "comments last_24h": g.db.query(Comment).filter(Comment.created_utc > day, Comment.author_id != AUTOJANNY_ID).count(), "post votes": g.db.query(Vote).count(), - "post voting users": g.db.query(Vote.user_id).distinct().count(), "comment votes": g.db.query(CommentVote).count(), - "comment voting users": g.db.query(CommentVote.user_id).distinct().count(), "total upvotes": g.db.query(Vote).filter_by(vote_type=1).count() + g.db.query(CommentVote).filter_by(vote_type=1).count(), "total downvotes": g.db.query(Vote).filter_by(vote_type=-1).count() + g.db.query(CommentVote).filter_by(vote_type=-1).count(), "total awards": g.db.query(AwardRelationship).count(),