Ejemplo n.º 1
0
    def __init__(self, config):
        """Method initializing the class.

        Args:
            config: ConfigServer Object

        Returns:
            None

        """
        # Instantiate poller
        self.config = config

        # Get PID filename
        agent_name = 'ingestd'
        f_obj = hidden.File()
        self.pidfile = f_obj.pid(agent_name)

        # Call up the base daemon
        Daemon.__init__(self, self.pidfile)
Ejemplo n.º 2
0
    def __init__(self, poller):
        """Method initializing the class.

        Args:
            poller: PollingAgent object

        Returns:
            None

        """
        # Instantiate poller
        self.poller = poller

        # Get PID filename
        agent_name = self.poller.name()
        f_obj = hidden.File()
        pidfile = f_obj.pid(agent_name)
        lockfile = f_obj.lock(agent_name)

        # Call up the base daemon
        Daemon.__init__(self, pidfile, lockfile=lockfile)