Exemplo n.º 1
0
def onDaemonCreated(daemon, event):
    """
    Called at the end of zeneventd's constructor.
    """
    register_eventlet()
    if daemon.options.daemon:
        daemon._workers = ProcessWorkers(daemon.options.workers, exec_worker,
                                         "Event worker")
Exemplo n.º 2
0
    def __init__(self):
        super(ZenActionD, self).__init__()
        self._consumer = None
        self._workers = ProcessWorkers(self.options.workers - 1, exec_worker,
                                       "zenactiond worker")
        self._heartbeatSender = QueueHeartbeatSender(
            'localhost', 'zenactiond', self.options.heartbeatTimeout)

        self._maintenanceCycle = MaintenanceCycle(
            self.options.maintenancecycle, self._heartbeatSender)
        self._callHomeCycler = CallHomeCycler(self.dmd)
        self._schedule = Schedule(self.options, self.dmd)
        self._schedule.sendEvent = self.dmd.ZenEventManager.sendEvent
        self._schedule.monitor = self.options.monitor