本文整理汇总了Python中txamqp.protocol.AMQClient.connectionLost方法的典型用法代码示例。如果您正苦于以下问题:Python AMQClient.connectionLost方法的具体用法?Python AMQClient.connectionLost怎么用?Python AMQClient.connectionLost使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类txamqp.protocol.AMQClient
的用法示例。
在下文中一共展示了AMQClient.connectionLost方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: connectionLost
# 需要导入模块: from txamqp.protocol import AMQClient [as 别名]
# 或者: from txamqp.protocol.AMQClient import connectionLost [as 别名]
def connectionLost(self, reason):
"""
Remove this protocol as a consumer of log events.
"""
self.chan = None
self.dispatcher.unregister(self.producer.put)
log.err(reason, "Connection lost")
AMQClient.connectionLost(self, reason)
示例2: connectionLost
# 需要导入模块: from txamqp.protocol import AMQClient [as 别名]
# 或者: from txamqp.protocol.AMQClient import connectionLost [as 别名]
def connectionLost(self, reason):
log.debug("connection lost %s" % reason)
AMQClient.connectionLost(self, reason)
self.factory.onConnectionLost(reason)
示例3: connectionLost
# 需要导入模块: from txamqp.protocol import AMQClient [as 别名]
# 或者: from txamqp.protocol.AMQClient import connectionLost [as 别名]
def connectionLost(self, reason):
AMQClient.connectionLost(self, reason)
self.connected = 0
self.factory.delConnection(self)
示例4: connectionLost
# 需要导入模块: from txamqp.protocol import AMQClient [as 别名]
# 或者: from txamqp.protocol.AMQClient import connectionLost [as 别名]
def connectionLost(self, *args, **kwargs):
AMQClient.connectionLost(self, *args, **kwargs)
self.factory.onConnectionLost.callback(self)
示例5: connectionLost
# 需要导入模块: from txamqp.protocol import AMQClient [as 别名]
# 或者: from txamqp.protocol.AMQClient import connectionLost [as 别名]
def connectionLost(self, failure):
AMQClient.connectionLost(self, failure)
self.factory.lostConnection(failure)