--- a/src/pyams_scheduler/scheduler.py Sat Mar 14 13:28:39 2015 +0100
+++ b/src/pyams_scheduler/scheduler.py Sat Mar 14 13:29:14 2015 +0100
@@ -22,7 +22,7 @@
# import packages
from pyams_utils.registry import query_utility
-from pyams_utils.request import check_request
+from pyramid.threadlocal import get_current_registry
from zope.container.folder import Folder
from zope.interface import implementer
from zope.schema.fieldproperty import FieldProperty
@@ -69,8 +69,8 @@
def _get_socket(self):
"""Open ØMQ socket"""
- request = check_request()
- handler = request.registry.settings.get(SCHEDULER_HANDLER_KEY, False)
+ registry = get_current_registry()
+ handler = registry.settings.get(SCHEDULER_HANDLER_KEY, False)
if handler:
context = zmq.Context()
socket = context.socket(zmq.REQ)