本文整理汇总了Python中synnefo.lib.amqp.AMQPClient.exchange_delete方法的典型用法代码示例。如果您正苦于以下问题:Python AMQPClient.exchange_delete方法的具体用法?Python AMQPClient.exchange_delete怎么用?Python AMQPClient.exchange_delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类synnefo.lib.amqp.AMQPClient
的用法示例。
在下文中一共展示了AMQPClient.exchange_delete方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: purge_exchanges
# 需要导入模块: from synnefo.lib.amqp import AMQPClient [as 别名]
# 或者: from synnefo.lib.amqp.AMQPClient import exchange_delete [as 别名]
def purge_exchanges():
"""Delete declared exchanges from RabbitMQ, after removing all queues"""
purge_queues()
client = AMQPClient()
client.connect()
exchanges = queues.EXCHANGES
print "Exchanges to be deleted: ", exchanges
if not get_user_confirmation():
return
for exch in exchanges:
result = client.exchange_delete(exchange=exch)
print "Deleting exchange %s. Result: %s" % (exch, result)
client.close()