mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-29 16:58:21 -05:00
Comment Votes: update CommentSortsCache *after* updating comment scores.
This was causing CSC to have scores based on stale (off-by-one) vote data. One thousand thanks to @raldi for noticing this.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user