本文整理匯總了Python中twisted.internet.protocol.ReconnectingClientFactory.clientConnectionFailed方法的典型用法代碼示例。如果您正苦於以下問題:Python ReconnectingClientFactory.clientConnectionFailed方法的具體用法?Python ReconnectingClientFactory.clientConnectionFailed怎麽用?Python ReconnectingClientFactory.clientConnectionFailed使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類twisted.internet.protocol.ReconnectingClientFactory
的用法示例。
在下文中一共展示了ReconnectingClientFactory.clientConnectionFailed方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: clientConnectionFailed
# 需要導入模塊: from twisted.internet.protocol import ReconnectingClientFactory [as 別名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionFailed [as 別名]
def clientConnectionFailed(self, connector, reason):
out.info("Connection failed with reason: " + str(reason))
ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
示例2: clientConnectionFailed
# 需要導入模塊: from twisted.internet.protocol import ReconnectingClientFactory [as 別名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionFailed [as 別名]
def clientConnectionFailed(self, connector, reason):
self.rtx.output('Connection failed. Reason: %s' % reason)
ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
self.rtx.gateway_connect(None)
示例3: clientConnectionFailed
# 需要導入模塊: from twisted.internet.protocol import ReconnectingClientFactory [as 別名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionFailed [as 別名]
def clientConnectionFailed(self, connector, reason):
log.warn('Conenction failed. Reason {reason!r}:', reason=reason)
ReconnectingClientFactory.clientConnectionFailed(self, connector,
reason)
# -------------
# Helper methods
# --------------
示例4: clientConnectionFailed
# 需要導入模塊: from twisted.internet.protocol import ReconnectingClientFactory [as 別名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionFailed [as 別名]
def clientConnectionFailed(self, connector, reason):
"""
Notify the connectionPool that we're unable to connect
"""
self.log.error("MemCache connection failed: {r}", r=reason)
if self._protocolInstance is not None:
self.connectionPool.clientBusy(self._protocolInstance)
ReconnectingClientFactory.clientConnectionFailed(
self,
connector,
reason)
示例5: clientConnectionFailed
# 需要導入模塊: from twisted.internet.protocol import ReconnectingClientFactory [as 別名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionFailed [as 別名]
def clientConnectionFailed(self, connector, reason):
self.log.error("Unable to connect to APN server: {reason}", reason=reason)
self.connected = False
ReconnectingClientFactory.clientConnectionFailed(
self, connector,
reason)
示例6: clientConnectionFailed
# 需要導入模塊: from twisted.internet.protocol import ReconnectingClientFactory [as 別名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionFailed [as 別名]
def clientConnectionFailed(self, connector, reason):
"""Try to connect again or errback pending request."""
ReconnectingClientFactory.clientConnectionFailed(self, connector,
reason)
if self._callID is None:
# The factory won't retry to connect, so notify that we failed
self._fire_requests(reason)
示例7: clientConnectionFailed
# 需要導入模塊: from twisted.internet.protocol import ReconnectingClientFactory [as 別名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionFailed [as 別名]
def clientConnectionFailed(self, connector, reason):
log.msg('Connection failed: %s' % (reason.value,))
self.window.clear()
self.window.addstr(0, 0, 'Connection failed: %s' % (reason.value,))
self.window.refresh()
ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
示例8: clientConnectionFailed
# 需要導入模塊: from twisted.internet.protocol import ReconnectingClientFactory [as 別名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionFailed [as 別名]
def clientConnectionFailed(self, connector, reason):
LOGGER.debug('Connection failed. Reason: %s', reason)
ReconnectingClientFactory.clientConnectionFailed(
self, connector, reason)
self._proto = None
示例9: clientConnectionFailed
# 需要導入模塊: from twisted.internet.protocol import ReconnectingClientFactory [as 別名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionFailed [as 別名]
def clientConnectionFailed(self, connector, reason):
log.info('pb-client-connection-failed')
pb.PBClientFactory.clientConnectionFailed(self, connector, reason)
ReconnectingClientFactory.clientConnectionFailed(self, connector,
reason)
log.info('pb-client-connection-failed-retrying')