You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2014/02/26 21:59:11 UTC

git commit: [#7178] Always return a MockSOLR instead of None, since things break without it

Repository: incubator-allura
Updated Branches:
  refs/heads/cj/7178 [created] faf212e45


[#7178] Always return a MockSOLR instead of None, since things break without it

Signed-off-by: Cory Johns <cj...@slashdotmedia.com>


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

Branch: refs/heads/cj/7178
Commit: faf212e456e4818672689b522ea6bcc9e4092851
Parents: e3af39b
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Wed Feb 26 20:58:44 2014 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Wed Feb 26 20:58:44 2014 +0000

----------------------------------------------------------------------
 Allura/allura/lib/app_globals.py | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/faf212e4/Allura/allura/lib/app_globals.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/app_globals.py b/Allura/allura/lib/app_globals.py
index f46c1eb..0f6f08e 100644
--- a/Allura/allura/lib/app_globals.py
+++ b/Allura/allura/lib/app_globals.py
@@ -150,17 +150,14 @@ class Globals(object):
         # skip empty strings in case of extra commas
         self.solr_server = [s for s in self.solr_server if s]
         self.solr_query_server = config.get('solr.query_server')
-        if asbool(config.get('solr.mock')):
-            self.solr = self.solr_short_timeout = MockSOLR()
-        elif self.solr_server:
+        if self.solr_server:
             self.solr = make_solr_from_config(
                 self.solr_server, self.solr_query_server)
             self.solr_short_timeout = make_solr_from_config(
                 self.solr_server, self.solr_query_server,
                 timeout=int(config.get('solr.short_timeout', 10)))
         else:  # pragma no cover
-            self.solr = None
-            self.solr_short_timeout = None
+            self.solr = self.solr_short_timeout = MockSOLR()
         self.use_queue = asbool(config.get('use_queue', False))
 
         # Load login/logout urls; only used for customized logins