Updated global registry access
authorThierry Florac <tflorac@ulthar.net>
Thu, 08 Feb 2018 08:54:58 +0100
changeset 49 f65a0b93fea7
parent 48 95237ab5a350
child 50 c66a8bf09662
Updated global registry access
src/pyams_scheduler/include.py
--- a/src/pyams_scheduler/include.py	Fri Jan 26 17:30:47 2018 +0100
+++ b/src/pyams_scheduler/include.py	Thu Feb 08 08:54:58 2018 +0100
@@ -28,12 +28,11 @@
 
 # import packages
 from pyams_scheduler.process import SchedulerProcess, SchedulerMessageHandler
-from pyams_utils.registry import set_local_registry
+from pyams_utils.registry import set_local_registry, get_global_registry
 from pyams_utils.zodb import get_connection_from_settings
 from pyams_zmq.process import process_exit_func
 from pyramid.events import subscriber
 from pyramid.settings import asbool
-from zope.component.globalregistry import getGlobalSiteManager
 
 
 def include_package(config):
@@ -59,7 +58,7 @@
     if sys.argv[0].endswith('pyams_upgrade'):
         return
 
-    registry = getGlobalSiteManager()
+    registry = get_global_registry()
     settings = registry.settings
     start_handler = asbool(settings.get(SCHEDULER_STARTER_KEY, False))
     if start_handler: