--- a/src/pyams_content_es/utility.py Wed Jul 12 14:26:26 2017 +0200
+++ b/src/pyams_content_es/utility.py Mon Sep 11 14:55:31 2017 +0200
@@ -24,7 +24,7 @@
from persistent import Persistent
from pyams_utils.registry import get_utility
from pyams_zmq.socket import zmq_socket, zmq_response
-from pyramid.threadlocal import get_current_registry
+from zope.component.globalregistry import getGlobalSiteManager
from zope.container.contained import Contained
from zope.interface import implementer
from zope.schema.fieldproperty import FieldProperty
@@ -37,7 +37,7 @@
zeo_connection = FieldProperty(IContentIndexerUtility['zeo_connection'])
def _get_socket(self):
- registry = get_current_registry()
+ registry = getGlobalSiteManager()
handler = registry.settings.get(INDEXER_HANDLER_KEY, False)
if handler:
return zmq_socket(handler)