Example #1
0
 def query_watchdog(self):
     '''Try to read the actual value of watchdog.'''
     if not self.timeout_call:
         if self.backend.send_cmd(command.forward(event.query_watchdog(origin=self.origin))):
             #pylint: disable=E1101
             self.timeout_call = reactor.callLater(self.QUERY_TIMEOUT, self.query_timeout)
         elif self.watchdog_call is None:
             # we can not make call to the controller: set expired handler:
             self._set_watchdog(self.QUERY_EXPIRED * self.QUERY_TIMEOUT)
Example #2
0
 def query_watchdog(self):
     '''Try to read the actual value of watchdog.'''
     if not self.timeout_call:
         if self.backend.send_cmd(
                 command.forward(event.query_watchdog(origin=self.origin))):
             #pylint: disable=E1101
             self.timeout_call = reactor.callLater(self.QUERY_TIMEOUT,
                                                   self.query_timeout)
         elif self.watchdog_call is None:
             # we can not make call to the controller: set expired handler:
             self._set_watchdog(self.QUERY_EXPIRED * self.QUERY_TIMEOUT)
Example #3
0
 def proc_evt_variable_get(self, evt):
     host = evt.arg('dest')
     if localhost(host):
         return
     # FIXME? remote Controller could listen on another port:
     port = self.def_port
     # loop for testing:
     if test_loop(host):
         # test.loop for testing forwarder on single machine.
         # could be used with port number test.loop:11432
         # Modify the dest field to avoid inifinite loop:
         evt.args()['dest'] = host.upper()
         port = int(test_loop_port(host) or port)
     cmd = command.forward(event=evt)
     d = self.remote_call(cmd, host, port)
     if d:
         d.addCallback(self.handle_evt_variable_get, evt)
Example #4
0
 def proc_evt_variable_get(self, evt):
     host = evt.arg('dest')
     if localhost(host):
         return
     # FIXME? remote Controller could listen on another port:
     port = self.def_port
     # loop for testing:
     if test_loop(host):
         # test.loop for testing forwarder on single machine.
         # could be used with port number test.loop:11432
         # Modify the dest field to avoid inifinite loop:
         evt.args()['dest'] = host.upper()
         port = int(test_loop_port(host) or port)
     cmd = command.forward(event=evt)
     d = self.remote_call(cmd, host, port)
     if d:
         d.addCallback(self.handle_evt_variable_get, evt)