Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't ignore 400 status code errors #66

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/create_hysds_ios_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
body = json.load(f)

# create destination index
mozart_es.es.indices.create(HYSDS_IOS_INDEX, body, ignore=400)
mozart_es.es.indices.create(HYSDS_IOS_INDEX, body)
2 changes: 1 addition & 1 deletion scripts/create_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
# get connection and create destination index
es_url = app.config['ES_URL']
es = Elasticsearch(hosts=[es_url])
es.indices.create(index=dest, ignore=400)
es.indices.create(index=dest)
2 changes: 1 addition & 1 deletion scripts/install_base_es_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def write_template(tmpl_file):
tmpl = json.load(f)

# https://elasticsearch-py.readthedocs.io/en/1.3.0/api.html#elasticsearch.Elasticsearch.put_template
grq_es.es.indices.put_template(name="index_defaults", body=tmpl, ignore=400)
grq_es.es.indices.put_template(name="index_defaults", body=tmpl)
print(f"Successfully installed template to index_defaults:\n{json.dumps(tmpl, indent=2)}")


Expand Down
2 changes: 1 addition & 1 deletion scripts/install_es_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def write_template(prefix, alias, tmpl_file):
tmpl = Template(f.read()).render(prefix=prefix, alias=alias)

# https://elasticsearch-py.readthedocs.io/en/1.3.0/api.html#elasticsearch.Elasticsearch.put_template
grq_es.es.indices.put_template(name=alias, body=tmpl, ignore=400)
grq_es.es.indices.put_template(name=alias, body=tmpl)
print(("Successfully installed template %s" % alias))


Expand Down
2 changes: 1 addition & 1 deletion scripts/install_ingest_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
pipeline_name = 'dataset_pipeline'

# https://elasticsearch-py.readthedocs.io/en/master/api.html#elasticsearch.client.IngestClient
grq_es.es.ingest.put_pipeline(id=pipeline_name, body=pipeline_settings, ignore=400)
grq_es.es.ingest.put_pipeline(id=pipeline_name, body=pipeline_settings)
2 changes: 1 addition & 1 deletion scripts/rename_s3_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def create_index(index, doctype):
# get connection and create index
es_url = 'http://localhost:9200'
es = Elasticsearch(hosts=[es_url])
es.indices.create(index, ignore=400)
es.indices.create(index)


url_keys = ['urls', 'browse_urls']
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name='grq2',
version='2.0.26',
version='2.0.27',
long_description='GeoRegionQuery REST API using ElasticSearch backend',
packages=find_packages(),
include_package_data=True,
Expand Down