From 7fed17d0144504ed1430a45bea1c01d845c5786f Mon Sep 17 00:00:00 2001 From: Logan Hanks Date: Wed, 9 Nov 2011 12:21:57 -0700 Subject: [PATCH] Fix syntax error from trying to add stats collection to the solrsearch queue. --- r2/r2/lib/solrsearch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r2/r2/lib/solrsearch.py b/r2/r2/lib/solrsearch.py index 5e4dc0687..f0ffd5739 100644 --- a/r2/r2/lib/solrsearch.py +++ b/r2/r2/lib/solrsearch.py @@ -667,6 +667,7 @@ def run_changed(drain=False): last run. Note: unlike many queue-using functions, this one is run from cron and totally drains the queue before terminating """ + @g.stats.amqp_processor def _run_changed(msgs, chan): print "changed: Processing %d items" % len(msgs) msgs = [strordict_fullname(msg.body) @@ -687,6 +688,5 @@ def run_changed(drain=False): for i in delete_things: s.delete(id=i._fullname) - @g.stats.amqp_processor amqp.handle_items('solrsearch_changes', _run_changed, limit=1000, drain=drain)