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.
This commit is contained in:
Neil Williams
2013-03-06 11:26:24 -08:00
parent 3b02c44f4d
commit bafc86a571

View File

@@ -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)