Changeset 52453 in webkit


Ignore:
Timestamp:
Dec 21, 2009 12:19:08 PM (14 years ago)
Author:
eric@webkit.org
Message:

2009-12-21 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Delete the boring "Empty queue" status messages in QueueStatusServer
https://bugs.webkit.org/show_bug.cgi?id=32818

  • QueueStatusServer/app.yaml:
  • QueueStatusServer/cron.yaml:
  • QueueStatusServer/handlers/gc.py:
  • QueueStatusServer/main.py:
Location:
trunk/WebKitTools
Files:
1 added
3 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r52437 r52453  
     12009-12-21  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Delete the boring "Empty queue" status messages in QueueStatusServer
     6        https://bugs.webkit.org/show_bug.cgi?id=32818
     7
     8        * QueueStatusServer/app.yaml:
     9        * QueueStatusServer/cron.yaml:
     10        * QueueStatusServer/handlers/gc.py:
     11        * QueueStatusServer/main.py:
     12
    1132009-12-21  Adam Barth  <abarth@webkit.org>
    214
  • trunk/WebKitTools/QueueStatusServer/app.yaml

    r52404 r52453  
    88  static_dir: stylesheets
    99
    10 - url: /remote_api
    11   script: $PYTHON_LIB/google/appengine/ext/remote_api/handler.py
    12   login: admin
    13 
    1410- url: /.*
    1511  script: main.py
  • trunk/WebKitTools/QueueStatusServer/handlers/gc.py

    r52450 r52453  
    2727# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2828
    29 # Request a modern Django
    30 from google.appengine.dist import use_library
    31 use_library('django', '1.1')
     29from google.appengine.ext import webapp
    3230
    33 from google.appengine.ext import webapp
    34 from google.appengine.ext.webapp.util import run_wsgi_app
     31from model.queuestatus import QueueStatus
    3532
    36 from handlers.dashboard import Dashboard
    37 from handlers.patch import Patch
    38 from handlers.patchstatus import PatchStatus
    39 from handlers.recentstatus import RecentStatus
    40 from handlers.showresults import ShowResults
    41 from handlers.statusbubble import StatusBubble
    42 from handlers.updatestatus import UpdateStatus
    4333
    44 webapp.template.register_template_library('filters.webkit_extras')
    45 
    46 routes = [
    47     ('/', RecentStatus),
    48     ('/queue-status/(.*)', RecentStatus),
    49     ('/update-status', UpdateStatus),
    50     ('/dashboard', Dashboard),
    51     (r'/patch-status/(.*)/(.*)', PatchStatus),
    52     (r'/patch/(.*)', Patch),
    53     (r'/status-bubble/(.*)', StatusBubble),
    54     (r'/results/(.*)', ShowResults)
    55 ]
    56 
    57 application = webapp.WSGIApplication(routes, debug=True)
    58 
    59 def main():
    60     run_wsgi_app(application)
    61 
    62 if __name__ == "__main__":
    63     main()
     34class GC(webapp.RequestHandler):
     35    def get(self):
     36        statuses = QueueStatus.all().order("-date")
     37        seen_queues = set()
     38        for status in statuses:
     39            if status.active_patch_id or status.active_bug_id:
     40                continue
     41            if status.queue_name in seen_queues:
     42                status.delete()
     43            seen_queues.add(status.queue_name)
     44        self.response.out.write("Done!")
  • trunk/WebKitTools/QueueStatusServer/main.py

    r52405 r52453  
    3535
    3636from handlers.dashboard import Dashboard
     37from handlers.gc import GC
    3738from handlers.patch import Patch
    3839from handlers.patchstatus import PatchStatus
     
    4647routes = [
    4748    ('/', RecentStatus),
    48     ('/queue-status/(.*)', RecentStatus),
    49     ('/update-status', UpdateStatus),
    5049    ('/dashboard', Dashboard),
     50    ('/gc', GC),
    5151    (r'/patch-status/(.*)/(.*)', PatchStatus),
    5252    (r'/patch/(.*)', Patch),
     53    (r'/results/(.*)', ShowResults),
    5354    (r'/status-bubble/(.*)', StatusBubble),
    54     (r'/results/(.*)', ShowResults)
     55    (r'/queue-status/(.*)', RecentStatus),
     56    ('/update-status', UpdateStatus),
    5557]
    5658
Note: See TracChangeset for help on using the changeset viewer.