summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2019-02-26 08:18:23 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2019-02-26 08:18:23 (GMT)
commit8480f697daf822c6c07b3415618f7d0d77557b0f (patch)
treed683e688dc639e6f5e55a85735aa0d2513cdc320
parentfe2cb2d23b6b1b79a6c825596ea73ae9885128fa (diff)
downloadpublik-client-scripts-8480f697daf822c6c07b3415618f7d0d77557b0f.zip
publik-client-scripts-8480f697daf822c6c07b3415618f7d0d77557b0f.tar.gz
publik-client-scripts-8480f697daf822c6c07b3415618f7d0d77557b0f.tar.bz2
strasbourg: add connection details for production serverv0.7v0.2
-rw-r--r--clients/strasbourg/index-formdefs-in-elasticsearch.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/clients/strasbourg/index-formdefs-in-elasticsearch.py b/clients/strasbourg/index-formdefs-in-elasticsearch.py
index d457538..fda4d38 100644
--- a/clients/strasbourg/index-formdefs-in-elasticsearch.py
+++ b/clients/strasbourg/index-formdefs-in-elasticsearch.py
@@ -5,10 +5,14 @@
from elasticsearch import Elasticsearch
+from quixote import get_publisher()
import wcs
from wcs.formdef import FormDef
-es = Elasticsearch([{'host': '46.18.194.18', 'port': 9200}])
+if 'test' in get_publisher().app_dir:
+ es = Elasticsearch([{'host': '46.18.194.18', 'port': 9200}])
+else:
+ es = Elasticsearch([{'host': '46.18.194.222', 'port': 9200}])
indexed_forms = es.search(index='liferay-20116', doc_type='LiferayDocumentType', q='type:procedure')
indexed_form_ids = [x['_id'] for x in res['hits']['hits']]