Hide status bubbles from queues which are very far behind
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Oct 2011 22:42:17 +0000 (22:42 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Oct 2011 22:42:17 +0000 (22:42 +0000)
https://bugs.webkit.org/show_bug.cgi?id=70133

Reviewed by Eric Seidel.

The mac-ews is so far behind that we shouldn't show its status bubble.
The status bubble just makes contributors sad.

* QueueStatusServer/handlers/statusbubble.py:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@97523 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/QueueStatusServer/handlers/statusbubble.py

index 4f3d5c9..cb574d6 100644 (file)
@@ -1,3 +1,15 @@
+2011-10-14  Adam Barth  <abarth@webkit.org>
+
+        Hide status bubbles from queues which are very far behind
+        https://bugs.webkit.org/show_bug.cgi?id=70133
+
+        Reviewed by Eric Seidel.
+
+        The mac-ews is so far behind that we shouldn't show its status bubble.
+        The status bubble just makes contributors sad.
+
+        * QueueStatusServer/handlers/statusbubble.py:
+
 2011-10-14  Dimitri Glazkov  <dglazkov@chromium.org>
 
         Write unit test to ensure style-checker-filter option is passed properly in webkit-patch
index 503057d..c6ba916 100644 (file)
@@ -37,12 +37,12 @@ from model.queues import Queue
 
 
 class StatusBubble(webapp.RequestHandler):
-    def _build_bubble(self, queue, attachment):
+    def _build_bubble(self, queue, attachment, queue_position):
         queue_status = attachment.status_for_queue(queue)
         bubble = {
             "name": queue.short_name().lower(),
             "attachment_id": attachment.id,
-            "queue_position": attachment.position_in_queue(queue),
+            "queue_position": queue_position,
             "state": attachment.state_from_queue_status(queue_status) if queue_status else "none",
             "status": queue_status,
         }
@@ -61,7 +61,11 @@ class StatusBubble(webapp.RequestHandler):
         for queue in Queue.all():
             if not self._have_status_for(attachment, queue):
                 continue
-            bubbles.append(self._build_bubble(queue, attachment))
+            queue_position = attachment.position_in_queue(queue)
+            if queue_position and queue_position >= 100:
+                # This queue is so far behind it's not even worth showing.
+                continue
+            bubbles.append(self._build_bubble(queue, attachment, queue_position))
             # If even one ews has status, we don't show the submit-to-ews button.
             if queue.is_ews():
                 show_submit_to_ews = False