Skip to content
Snippets Groups Projects
Commit b8dbd636 authored by Alessandro Cerioni's avatar Alessandro Cerioni
Browse files

Making the incremental reindexer robust w/ respect to missing destination index.

parent 0be7a674
Branches
Tags
No related merge requests found
...@@ -90,7 +90,11 @@ def on_msg_callback(channel, method, properties, body): ...@@ -90,7 +90,11 @@ def on_msg_callback(channel, method, properties, body):
es = Elasticsearch([cfg['reindexer']['destination_url']], timeout=60) es = Elasticsearch([cfg['reindexer']['destination_url']], timeout=60)
index = cfg['reindexer']['destination_index'] index = cfg['reindexer']['destination_index']
es.indices.refresh(index=index) try:
es.indices.refresh(index=index)
except NotFoundError:
# the destination index may not be already present
pass
the_query = dict() the_query = dict()
the_query['query'] = dict() the_query['query'] = dict()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment