Beispiel #1
0
 def clientConnectionFailed(self, connector, reason):
     addr = connector.getDestination()
     log.warn("Connecting to %s:%s failed: %s" %
              (addr.host, addr.port, reason.value),
              prefix=self.logstr)
     self._connection = None
     self._reconnect()
Beispiel #2
0
 def processEnded(self, reason):
     if isinstance(reason.value, error.ProcessDone):
         log.debug("Process ended", prefix=self._pid)
         reason = None
     else:
         log.warn(reason, prefix=self._pid)
     deferred = self._deferred
     self._deferred = None
     deferred.callback(reason)
Beispiel #3
0
 def clientConnectionLost(self, connector, reason):
     addr = connector.getDestination()
     if isinstance(reason.value, error.ConnectionDone):
         log.info("Connection to %s:%s closed" % (addr.host, addr.port))
     else:
         log.warn("Connection to %s:%s lost: %s" %
                 (addr.host, addr.port, reason.value), prefix=self.logstr)
     self._connection = None
     self._reconnect()
Beispiel #4
0
 def processEnded(self, reason):
     if isinstance(reason.value, error.ProcessDone):
         log.debug("Process ended", prefix=self._pid)
         reason = None
     else:
         log.warn(reason, prefix=self._pid)
     deferred = self._deferred
     self._deferred = None
     deferred.callback(reason)
Beispiel #5
0
 def clientConnectionLost(self, connector, reason):
     addr = connector.getDestination()
     if isinstance(reason.value, error.ConnectionDone):
         log.info("Connection to %s:%s closed" % (addr.host, addr.port))
     else:
         log.warn("Connection to %s:%s lost: %s" %
                  (addr.host, addr.port, reason.value),
                  prefix=self.logstr)
     self._connection = None
     self._reconnect()
Beispiel #6
0
    def connect(self):
        if not self._path:
            return

        try:
            os.unlink(self._path)
            log.warn("Removed an old socket: %s" % self._path)
        except OSError:
            pass

        self._socket = reactor.listenUNIX(self._path, self)
Beispiel #7
0
    def connect(self):
        if not self._path:
            return

        try:
            os.unlink(self._path)
            log.warn("Removed an old socket: %s" % self._path)
        except OSError:
            pass

        self._socket = reactor.listenUNIX(self._path, self)
Beispiel #8
0
 def sendLine(self, line):
     if line.startswith("error"):
         log.warn(line, prefix=self._pid)
     else:
         log.trace(line, prefix=self._pid)
Beispiel #9
0
 def errReceived(self, data):
     log.warn(data.strip(), prefix=self._pid)
Beispiel #10
0
 def clientConnectionFailed(self, connector, reason):
     addr = connector.getDestination()
     log.warn("Connecting to %s:%s failed: %s" %
             (addr.host, addr.port, reason.value), prefix=self.logstr)
     self._connection = None
     self._reconnect()
Beispiel #11
0
 def _force_disconnect(self):
     if self._connection:
         log.warn("Killing connection...")
         self._force_disconnect_timer = None
         self._connection.transport.loseConnection()
Beispiel #12
0
 def sendLine(self, line):
     if line.startswith("error"):
         log.warn(line, prefix=self._pid)
     else:
         log.trace(line, prefix=self._pid)
Beispiel #13
0
 def errReceived(self, data):
     log.warn(data.strip(), prefix=self._pid)
Beispiel #14
0
 def _force_disconnect(self):
     if self._connection:
         log.warn("Killing connection...")
         self._force_disconnect_timer = None
         self._connection.transport.loseConnection()