Skip to content

Commit

Permalink
Fix es_as_db variable
Browse files Browse the repository at this point in the history
  • Loading branch information
spender-sandbox committed Aug 15, 2016
1 parent 8485879 commit 286470a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions web/analysis/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@
from bson.objectid import ObjectId
results_db = pymongo.MongoClient(settings.MONGO_HOST, settings.MONGO_PORT)[settings.MONGO_DB]

es_as_db = False
if enabledconf["elasticsearchdb"]:
from elasticsearch import Elasticsearch
es_as_db = True
essearch = Config("reporting").elasticsearchdb.searchonly
if essearch: es_as_db = False
if not essearch:
es_as_db = True
baseidx = Config("reporting").elasticsearchdb.index
fullidx = baseidx + "-*"
es = Elasticsearch(hosts = [{
Expand Down

0 comments on commit 286470a

Please sign in to comment.