本文整理汇总了Python中junebug.channel.Channel.status方法的典型用法代码示例。如果您正苦于以下问题:Python Channel.status方法的具体用法?Python Channel.status怎么用?Python Channel.status使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类junebug.channel.Channel
的用法示例。
在下文中一共展示了Channel.status方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: create_channel
# 需要导入模块: from junebug.channel import Channel [as 别名]
# 或者: from junebug.channel.Channel import status [as 别名]
def create_channel(self, request, body):
'''Create a channel'''
channel = Channel(
self.redis, self.config, body)
yield channel.save()
yield channel.start(self.service)
returnValue(response(
request, 'channel created', (yield channel.status())))
示例2: create_channel
# 需要导入模块: from junebug.channel import Channel [as 别名]
# 或者: from junebug.channel.Channel import status [as 别名]
def create_channel(self, request, body):
'''Create a channel'''
channel = Channel(
self.redis, self.config, body, self.plugins)
yield channel.start(self.service)
yield channel.save()
returnValue(response(
request, 'channel created', (yield channel.status()),
code=http.CREATED))
示例3: create_channel
# 需要导入模块: from junebug.channel import Channel [as 别名]
# 或者: from junebug.channel.Channel import status [as 别名]
def create_channel(self, request, body):
'''Create a channel'''
if not (body.get('mo_url') or body.get('amqp_queue')):
raise ApiUsageError(
'One or both of "mo_url" and "amqp_queue" must be specified')
channel = Channel(
self.redis, self.config, body, self.plugins)
yield channel.save()
yield channel.start(self.service)
returnValue(response(
request, 'channel created', (yield channel.status())))