diff --git a/r2/r2/lib/db/queries.py b/r2/r2/lib/db/queries.py index 6a13dfdc4..d75240eea 100755 --- a/r2/r2/lib/db/queries.py +++ b/r2/r2/lib/db/queries.py @@ -1507,10 +1507,6 @@ def process_votes(qname, limit=0): votee = Thing._by_fullname(tid, data = True) timer.intermediate("preamble") - if isinstance(votee, Comment): - update_comment_votes([votee]) - timer.intermediate("update_comment_votes") - # I don't know how, but somebody is sneaking in votes # for subreddits if isinstance(votee, (Link, Comment)): @@ -1518,6 +1514,10 @@ def process_votes(qname, limit=0): handle_vote(voter, votee, dir, ip, organic, cheater = cheater, foreground=True, timer=timer) + if isinstance(votee, Comment): + update_comment_votes([votee]) + timer.intermediate("update_comment_votes") + timer.flush() amqp.consume_items(qname, _handle_vote, verbose = False)