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 2014/03/04 17:36:20 UTC
git commit: [#7178] Always return a MockSOLR instead of None,
since things break without it
Repository: incubator-allura
Updated Branches:
refs/heads/master 8fbd4d6ee -> dc4ca356e
[#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/dc4ca356
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/dc4ca356
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/dc4ca356
Branch: refs/heads/master
Commit: dc4ca356e10b9ede614eab783ae4e80089c78b14
Parents: 8fbd4d6
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Wed Feb 26 20:58:44 2014 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Tue Mar 4 16:33:17 2014 +0000
----------------------------------------------------------------------
Allura/allura/lib/app_globals.py | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/dc4ca356/Allura/allura/lib/app_globals.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/app_globals.py b/Allura/allura/lib/app_globals.py
index f46c1eb..9548cac 100644
--- a/Allura/allura/lib/app_globals.py
+++ b/Allura/allura/lib/app_globals.py
@@ -150,17 +150,15 @@ 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
+ log.warning('Solr config not set; using in-memory MockSOLR')
+ 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