Exemplo n.º 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()
Exemplo n.º 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)
Exemplo n.º 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()
Exemplo n.º 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)
Exemplo n.º 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()
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 8
0
 def sendLine(self, line):
     if line.startswith("error"):
         log.warn(line, prefix=self._pid)
     else:
         log.trace(line, prefix=self._pid)
Exemplo n.º 9
0
 def errReceived(self, data):
     log.warn(data.strip(), prefix=self._pid)
Exemplo n.º 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()
Exemplo n.º 11
0
 def _force_disconnect(self):
     if self._connection:
         log.warn("Killing connection...")
         self._force_disconnect_timer = None
         self._connection.transport.loseConnection()
Exemplo n.º 12
0
 def sendLine(self, line):
     if line.startswith("error"):
         log.warn(line, prefix=self._pid)
     else:
         log.trace(line, prefix=self._pid)
Exemplo n.º 13
0
 def errReceived(self, data):
     log.warn(data.strip(), prefix=self._pid)
Exemplo n.º 14
0
 def _force_disconnect(self):
     if self._connection:
         log.warn("Killing connection...")
         self._force_disconnect_timer = None
         self._connection.transport.loseConnection()