--- a/src/pyams_content_es/site.py Fri Jul 20 12:58:50 2018 +0200
+++ b/src/pyams_content_es/site.py Mon Sep 17 16:14:56 2018 +0200
@@ -18,15 +18,13 @@
# import interfaces
from pyams_content_es.interfaces import IContentIndexerUtility, INDEXER_NAME, IDocumentIndexTarget
-from pyams_utils.interfaces.site import ISiteGenerations
-
# import packages
from pyams_content_es.utility import ContentIndexerUtility
from pyams_utils.container import find_objects_providing
+from pyams_utils.interfaces.site import ISiteGenerations
from pyams_utils.registry import utility_config, set_local_registry, query_utility
from pyams_utils.site import check_required_utilities, site_factory
-
REQUIRED_UTILITIES = ((IContentIndexerUtility, '', ContentIndexerUtility, INDEXER_NAME), )
@@ -58,6 +56,7 @@
for document in find_objects_providing(application, IDocumentIndexTarget):
print("Indexing: {0!r}".format(document))
es_client.index_object(document)
+ transaction.savepoint()
finally:
set_local_registry(None)
transaction.commit()