

def notify_event(self, topic, msg):
    'Publish a message on the event publisher channel'
    name = bytestring(self.res_name)
    multipart_msg = [b(('watcher.%s.%s' % (name, topic))), json.dumps(msg)]
    if ((self.evpub_socket is not None) and (not self.evpub_socket.closed)):
        self.evpub_socket.send_multipart(multipart_msg)

dataset/ETHPy150Open circus-tent/circus/circus/watcher.py Watcher.notify_event/original