def __call__(self): BaseMonitor.__call__(self) d = LocalAgentMonitor.__call__(self) d.addCallback(self.pingHost) d.addErrback(log.error) d.addCallback(self.getPingReturn) d.addErrback(log.error)
def __call__(self): # call the superclass, but only to do the checks; don't connect, since # we need to iterate through the ports and connect several times per # port BaseMonitor.__call__(self, connect=False) for port in self.ports: d = self.doPing(port) d.addCallback(self.getPingReturn, port) d.addErrback(log.error) d.addCallback(self.protocol.connectionLost, 'completed ping')
def __call__(self): HTTPClientFactory.__init__(self, self.page_url, method=self.method, agent=self.agent, timeout=self.defaults.interval) BaseMonitor.__call__(self) # this deferred is created above when # HTTPClientFactory.__init__() is called. d = self.deferred d.addCallback(self.logStatus) d.addErrback(self.errorHandlerPartialPage) d.addErrback(self.errorHandlerTimeout)