Exemplo n.º 1
0
 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())
Exemplo n.º 2
0
 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()))
Exemplo n.º 3
0
 def _add_attachment_to_ews_queues(self, attachment):
     for queue in Queue.all_ews():
         if self._should_add_to_ews_queue(queue, attachment):
             queue.work_items().add_work_item(attachment.id)
Exemplo n.º 4
0
 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()))
Exemplo n.º 5
0
 def _check_processed_by_all_queues(attachment):
     return all(
         attachment.position_in_queue(queue) is None
         for queue in Queue.all_ews())