本文整理汇总了Python中model.queues.Queue.all_ews方法的典型用法代码示例。如果您正苦于以下问题:Python Queue.all_ews方法的具体用法?Python Queue.all_ews怎么用?Python Queue.all_ews使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类model.queues.Queue
的用法示例。
在下文中一共展示了Queue.all_ews方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_style_queue_is_ews
# 需要导入模块: from model.queues import Queue [as 别名]
# 或者: from model.queues.Queue import all_ews [as 别名]
def test_style_queue_is_ews(self):
# For now we treat the style-queue as an EWS since most users would
# describe it as such. If is_ews() ever needs to mean "builds the patch"
# or similar, then we will need to adjust all callers.
self.assertTrue(Queue("style-queue").is_ews())
self.assertTrue("style-queue" in map(Queue.name, Queue.all_ews()))
示例2: _add_attachment_to_ews_queues
# 需要导入模块: from model.queues import Queue [as 别名]
# 或者: from model.queues.Queue import all_ews [as 别名]
def _add_attachment_to_ews_queues(self, attachment):
for queue in Queue.all_ews(): # all_ews() currently includes the style-queue
if self._should_add_to_ews_queue(queue, attachment):
queue.work_items().add_work_item(attachment.id)
RecordPatchEvent.added(attachment.id, queue.name())