From: Andrew Gerrand Date: Mon, 6 Jun 2011 00:41:11 +0000 (+1000) Subject: dashboard: bug fix X-Git-Tag: weekly.2011-06-09~60 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=3b938f7db087ab7bcda905a84dd7fe10123d058d;p=gostls13.git dashboard: bug fix R=golang-dev, rsc CC=golang-dev https://golang.org/cl/4535104 --- diff --git a/misc/dashboard/godashboard/gobuild.py b/misc/dashboard/godashboard/gobuild.py index ee700c73b1..5678f2e1b0 100644 --- a/misc/dashboard/godashboard/gobuild.py +++ b/misc/dashboard/godashboard/gobuild.py @@ -376,8 +376,8 @@ def getBrokenCommit(node, builder): return def firstResult(builder): - q = Commit.all().order('-__key__').limit(20) - for c in q: + q = Commit.all().order('-__key__') + for c in q.fetch(20): for i, b in enumerate(c.builds): p = b.split('`', 1) if p[0] == builder: @@ -392,9 +392,12 @@ def nodeAfter(c): def notifyBroken(c, builder): def send(): - n = Commit.get_by_key_name('%08x-%s' % (c.num, c.node)) - if n.fail_notification_sent: - return False + n = Commit.get(c.key()) + if n is None: + logging.error("couldn't retrieve Commit '%s'" % c.key()) + return False + if n.fail_notification_sent: + return False n.fail_notification_sent = True return n.put() if not db.run_in_transaction(send):