diff options
author | Muriithi Frederick Muriuki | 2018-02-09 11:02:07 +0300 |
---|---|---|
committer | Muriithi Frederick Muriuki | 2018-02-09 11:02:07 +0300 |
commit | 4fe60697964d81ce1425000e764fd0a27d73eb29 (patch) | |
tree | ae7f8f2ab5fe9c39e732be74154b9c47d1bc9948 /wqflask/utility/elasticsearch_tools.py | |
parent | 25ff5e9e47c568547a855e42a4fd43477db2a61e (diff) | |
download | genenetwork2-4fe60697964d81ce1425000e764fd0a27d73eb29.tar.gz |
Check elasticsearch at point of use
* Instead of checking for the state of elasticsearch at startup, check
the state at the moment the user requests a feature that depends on
elasticsearch.
This reduces the chances that the user is dropped onto an exception
page when elasticsearch server goes down.
Diffstat (limited to 'wqflask/utility/elasticsearch_tools.py')
-rw-r--r-- | wqflask/utility/elasticsearch_tools.py | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/wqflask/utility/elasticsearch_tools.py b/wqflask/utility/elasticsearch_tools.py index a0383033..4fc0035c 100644 --- a/wqflask/utility/elasticsearch_tools.py +++ b/wqflask/utility/elasticsearch_tools.py @@ -8,9 +8,6 @@ try: , "port": ELASTICSEARCH_PORT }]) if (ELASTICSEARCH_HOST and ELASTICSEARCH_PORT) else None - # Check if elasticsearch is running - if not es.ping(): - es = None except: es = None |