From bafc86a5718305436e00350872c272d0ba994405 Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Wed, 6 Mar 2013 11:26:24 -0800 Subject: [PATCH] Automatically ignore fastlane comments in normal commentstree_q. This is safer than skip_commentstree_q as it's tied to the live config rather than a data attribute that we can forget to change back. --- r2/r2/lib/db/queries.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/r2/r2/lib/db/queries.py b/r2/r2/lib/db/queries.py index 9ae9e395f..05c02b464 100755 --- a/r2/r2/lib/db/queries.py +++ b/r2/r2/lib/db/queries.py @@ -1375,9 +1375,12 @@ def run_commentstree(qname="commentstree_q", limit=100): # messages that were put into the non-fastlane queue and are causing # both to back up. a full recompute of the old thread will fix these # missed messages. - links = Link._byID([com.link_id for com in comments], data=True) - comments = [com for com in comments - if links[com.link_id].skip_commentstree_q != qname] + if qname == "commentstree_q": + fastlaned_links = g.live_config["fastlane_links"] + links = Link._byID([com.link_id for com in comments], data=True) + comments = [com for com in comments + if utils.to36(com.link_id) not in fastlaned_links and + links[com.link_id].skip_commentstree_q != qname] if comments: add_comments(comments)