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

Removing useless dependency; adding index refresh after delete_by_query

parent 8f899ce6
Branches
Tags
No related merge requests found
...@@ -6,7 +6,7 @@ import json ...@@ -6,7 +6,7 @@ import json
import time import time
from elasticsearch import Elasticsearch, NotFoundError, AuthorizationException from elasticsearch import Elasticsearch, NotFoundError, AuthorizationException
from copy import deepcopy from copy import deepcopy
from pymongo import MongoClient #from pymongo import MongoClient
from collections import OrderedDict from collections import OrderedDict
from lib.geonetwork_helper import get_metadata_records from lib.geonetwork_helper import get_metadata_records
from lib.exit_gracefully import exit_gracefully from lib.exit_gracefully import exit_gracefully
...@@ -176,7 +176,7 @@ def delete_dataset_from_dest_index( the_cfg, the_uuid ): ...@@ -176,7 +176,7 @@ def delete_dataset_from_dest_index( the_cfg, the_uuid ):
try: try:
res = es.delete_by_query(index, doc_type='_doc', body=the_query) res = es.delete_by_query(index, doc_type='_doc', body=the_query)
#logging.debug(res) es.indices.refresh(index=index)
except AuthorizationException as e: except AuthorizationException as e:
logging.critical(e) logging.critical(e)
exit(1) exit(1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment