本文整理匯總了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())