Another perf-o-matic build fix.
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Feb 2012 07:00:02 +0000 (07:00 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Feb 2012 07:00:02 +0000 (07:00 +0000)
* Websites/webkit-perf.appspot.com/report_process_handler.py:
(ReportProcessHandler._create_build_if_possible):

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

ChangeLog
Websites/webkit-perf.appspot.com/report_process_handler.py

index 3b394e2..97a1df4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2012-02-12  Ryosuke Niwa  <rniwa@webkit.org>
 
+        Another perf-o-matic build fix.
+
+        * Websites/webkit-perf.appspot.com/report_process_handler.py:
+        (ReportProcessHandler._create_build_if_possible):
+
+2012-02-12  Ryosuke Niwa  <rniwa@webkit.org>
+
         Perf-o-matic build fix.
 
         * Websites/webkit-perf.appspot.com/report_handler.py:
index 4cfa9ed..4e6e2e8 100644 (file)
@@ -75,15 +75,8 @@ class ReportProcessHandler(webapp2.RequestHandler):
         builder = log.builder()
         key_name = builder.name + ':' + str(int(time.mktime(log.timestamp().timetuple())))
 
-        def execute():
-            build = Build.get_by_key_name(key_name)
-            if build:
-                return build
-
-            return Build(branch=branch, platform=platform, builder=builder, buildNumber=log.build_number(),
-                timestamp=log.timestamp(), revision=log.webkit_revision(), chromiumRevision=log.chromium_revision(),
-                key_name=key_name).put()
-        return db.run_in_transaction(execute)
+        return Build.get_or_insert(key_name, branch=branch, platform=platform, builder=builder, buildNumber=log.build_number(),
+            timestamp=log.timestamp(), revision=log.webkit_revision(), chromiumRevision=log.chromium_revision())
 
     def _add_test_if_needed(self, test_name, branch, platform):