コード例 #1
0
ファイル: receiverdaemon.py プロジェクト: LionelR/alignak
    def __init__(self, config_file, is_daemon, do_replace, debug, debug_file):

        super(Receiver, self).__init__(
            'receiver', config_file, is_daemon, do_replace, debug, debug_file)

        # Our arbiters
        self.arbiters = {}

        # Our pollers and reactionners
        self.pollers = {}
        self.reactionners = {}

        # Modules are load one time
        self.have_modules = False

        # Can have a queue of external_commands give by modules
        # will be taken by arbiter to process
        self.external_commands = []
        # and the unprocessed one, a buffer
        self.unprocessed_external_commands = []

        self.host_assoc = {}
        self.direct_routing = False
        self.accept_passive_unknown_check_results = False

        self.http_interface = ReceiverInterface(self)

        # Now create the external commander. It's just here to dispatch
        # the commands to schedulers
        ecm = ExternalCommandManager(None, 'receiver')
        ecm.load_receiver(self)
        self.external_command = ecm
コード例 #2
0
    def __init__(self, config_file, is_daemon, do_replace, debug, debug_file):

        super(Receiver, self).__init__('receiver', config_file, is_daemon,
                                       do_replace, debug, debug_file)

        # Our arbiters
        self.arbiters = {}

        # Our pollers and reactionners
        self.pollers = {}
        self.reactionners = {}

        # Modules are load one time
        self.have_modules = False

        # Can have a queue of external_commands give by modules
        # will be taken by arbiter to process
        self.external_commands = []
        # and the unprocessed one, a buffer
        self.unprocessed_external_commands = []

        self.host_assoc = {}
        self.direct_routing = False
        self.accept_passive_unknown_check_results = False

        self.http_interface = ReceiverInterface(self)

        # Now create the external commander. It's just here to dispatch
        # the commands to schedulers
        ecm = ExternalCommandManager(None, 'receiver')
        ecm.load_receiver(self)
        self.external_command = ecm