You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2012/10/10 18:31:04 UTC

[1/2] git commit: [#5102] verbose logging option in add_artifacts

Updated Branches:
  refs/heads/db/5102 [created] bb3396512


[#5102] verbose logging option in add_artifacts


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/bb339651
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/bb339651
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/bb339651

Branch: refs/heads/db/5102
Commit: bb339651226db65afe28f7602973625f2777d09f
Parents: ac9b16f
Author: Dave Brondsema <db...@geek.net>
Authored: Wed Oct 10 16:30:54 2012 +0000
Committer: Dave Brondsema <db...@geek.net>
Committed: Wed Oct 10 16:30:54 2012 +0000

----------------------------------------------------------------------
 Allura/allura/tasks/index_tasks.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/bb339651/Allura/allura/tasks/index_tasks.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tasks/index_tasks.py b/Allura/allura/tasks/index_tasks.py
index 84c7abe..8010b6e 100644
--- a/Allura/allura/tasks/index_tasks.py
+++ b/Allura/allura/tasks/index_tasks.py
@@ -10,7 +10,7 @@ from allura.lib.exceptions import CompoundError
 log = logging.getLogger(__name__)
 
 @task
-def add_artifacts(ref_ids, update_solr=True, update_refs=True):
+def add_artifacts(ref_ids, update_solr=True, update_refs=True, verbose=False):
     '''Add the referenced artifacts to SOLR and shortlinks'''
     from allura import model as M
     from allura.lib.search import find_shortlinks, solarize
@@ -33,6 +33,8 @@ def add_artifacts(ref_ids, update_solr=True, update_refs=True):
             except Exception:
                 log.error('Error indexing artifact %s', ref._id)
                 exceptions.append(sys.exc_info())
+        if verbose:
+            log.info('add_artifacts sending %s to solr' % len(solr_updates))
         g.solr.add(solr_updates)
 
     if len(exceptions) == 1: