[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Thu Apr 8 00:44:48 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit db369792f0fe3870463556a2cfae580077f30866
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Dec 21 20:19:08 2009 +0000

    2009-12-21  Adam Barth  <abarth at 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:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52453 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index b35863a..9778002 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -2,6 +2,18 @@
 
         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:
+
+2009-12-21  Adam Barth  <abarth at webkit.org>
+
+        Reviewed by Eric Seidel.
+
         Exception on queue status server
         https://bugs.webkit.org/show_bug.cgi?id=32812
 
diff --git a/WebKitTools/QueueStatusServer/app.yaml b/WebKitTools/QueueStatusServer/app.yaml
index 76d8963..f6ff870 100644
--- a/WebKitTools/QueueStatusServer/app.yaml
+++ b/WebKitTools/QueueStatusServer/app.yaml
@@ -7,9 +7,5 @@ handlers:
 - url: /stylesheets
   static_dir: stylesheets
 
-- url: /remote_api
-  script: $PYTHON_LIB/google/appengine/ext/remote_api/handler.py
-  login: admin
-
 - url: /.*
   script: main.py
diff --git a/WebKitTools/QueueStatusServer/cron.yaml b/WebKitTools/QueueStatusServer/cron.yaml
new file mode 100644
index 0000000..91ea3e3
--- /dev/null
+++ b/WebKitTools/QueueStatusServer/cron.yaml
@@ -0,0 +1,4 @@
+cron:
+- description: collect the garbage
+  url: /gc
+  schedule: every 30 minutes
diff --git a/WebKitTools/QueueStatusServer/handlers/gc.py b/WebKitTools/QueueStatusServer/handlers/gc.py
new file mode 100644
index 0000000..d04ee4d
--- /dev/null
+++ b/WebKitTools/QueueStatusServer/handlers/gc.py
@@ -0,0 +1,44 @@
+# Copyright (C) 2009 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# 
+#     * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+#     * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+# 
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+from google.appengine.ext import webapp
+
+from model.queuestatus import QueueStatus
+
+
+class GC(webapp.RequestHandler):
+    def get(self):
+        statuses = QueueStatus.all().order("-date")
+        seen_queues = set()
+        for status in statuses:
+            if status.active_patch_id or status.active_bug_id:
+                continue
+            if status.queue_name in seen_queues:
+                status.delete()
+            seen_queues.add(status.queue_name)
+        self.response.out.write("Done!")
diff --git a/WebKitTools/QueueStatusServer/main.py b/WebKitTools/QueueStatusServer/main.py
index 3bc6092..8efc771 100644
--- a/WebKitTools/QueueStatusServer/main.py
+++ b/WebKitTools/QueueStatusServer/main.py
@@ -34,6 +34,7 @@ from google.appengine.ext import webapp
 from google.appengine.ext.webapp.util import run_wsgi_app
 
 from handlers.dashboard import Dashboard
+from handlers.gc import GC
 from handlers.patch import Patch
 from handlers.patchstatus import PatchStatus
 from handlers.recentstatus import RecentStatus
@@ -45,13 +46,14 @@ webapp.template.register_template_library('filters.webkit_extras')
 
 routes = [
     ('/', RecentStatus),
-    ('/queue-status/(.*)', RecentStatus),
-    ('/update-status', UpdateStatus),
     ('/dashboard', Dashboard),
+    ('/gc', GC),
     (r'/patch-status/(.*)/(.*)', PatchStatus),
     (r'/patch/(.*)', Patch),
+    (r'/results/(.*)', ShowResults),
     (r'/status-bubble/(.*)', StatusBubble),
-    (r'/results/(.*)', ShowResults)
+    (r'/queue-status/(.*)', RecentStatus),
+    ('/update-status', UpdateStatus),
 ]
 
 application = webapp.WSGIApplication(routes, debug=True)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list