--- a/src/pyams_zmq/process.py Thu Jan 10 16:59:31 2019 +0100
+++ b/src/pyams_zmq/process.py Thu Jan 10 17:00:00 2019 +0100
@@ -12,21 +12,18 @@
__docformat__ = 'restructuredtext'
-
-# import standard library
import multiprocessing
import signal
import sys
+
import zmq
-
-# import interfaces
-from pyams_zmq.interfaces import IZMQProcess
-
-# import packages
from zmq.auth.thread import ThreadAuthenticator
from zmq.eventloop import ioloop, zmqstream
from zope.interface import implementer
+from pyams_utils.registry import get_global_registry
+from pyams_zmq.interfaces import IZMQProcess, ZMQProcessStartedEvent
+
@implementer(IZMQProcess)
class ZMQProcess(multiprocessing.Process):
@@ -75,6 +72,8 @@
"""Sets up everything and starts the event loop."""
signal.signal(signal.SIGTERM, self.exit)
self.setup()
+ registry = get_global_registry()
+ registry.notify(ZMQProcessStartedEvent(self))
self.loop.start()
def stop(self):