mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Updating db monitor for elasticsearch 7
This commit is contained in:
parent
8ceafe0465
commit
9258f5e112
2 changed files with 3 additions and 2 deletions
|
@ -209,11 +209,11 @@ def db_check_redis_pubsub():
|
|||
@app.route("/db_check/elasticsearch")
|
||||
def db_check_elasticsearch():
|
||||
try:
|
||||
conn = elasticsearch.Elasticsearch('db-elasticsearch.service.nyc1.consul')
|
||||
conn = elasticsearch.Elasticsearch('db-elasticsearch.node.nyc1.consul')
|
||||
except:
|
||||
abort(503)
|
||||
|
||||
if conn.indices.exists_index('feeds-index'):
|
||||
if conn.indices.exists('feeds-index'):
|
||||
return str("Index exists, but didn't try search")
|
||||
# query = pyes.query.TermQuery("title", "daring fireball")
|
||||
# results = conn.search(query=query, size=1, doc_types=['feeds-type'], sort="num_subscribers:desc")
|
||||
|
|
|
@ -9,3 +9,4 @@ Django>=3.1,<3.2
|
|||
sentry-sdk[flask]
|
||||
mongoengine==0.21.0
|
||||
boto3==1.18.13
|
||||
pyyaml==5.3.1
|
||||
|
|
Loading…
Add table
Reference in a new issue