mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
commentstree_q: Add a min size for fastlane.
This commit is contained in:
@@ -1718,10 +1718,13 @@ def run_commentstree(qname="commentstree_q", limit=100):
|
||||
if comments:
|
||||
add_comments(comments)
|
||||
|
||||
min_size = 0
|
||||
|
||||
# High velocity threads put additional pressure on Cassandra.
|
||||
if qname == "commentstree_fastlane_q":
|
||||
limit = max(1000, limit)
|
||||
amqp.handle_items(qname, _run_commentstree, limit = limit)
|
||||
min_size = min(1000, limit)
|
||||
amqp.handle_items(qname, _run_commentstree, limit=limit, min_size=min_size)
|
||||
|
||||
|
||||
def _by_type(items):
|
||||
|
||||
Reference in New Issue
Block a user