diff options
| author | Ondřej Surý <ondrej@sury.org> | 2011-06-10 10:59:18 +0200 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2011-06-10 10:59:18 +0200 |
| commit | c29cace1e8f3260389ea78fa4ef86d80cd5e5275 (patch) | |
| tree | 947e4435053998a194caacab99bf614d8fd5bc78 /misc/dashboard/godashboard/gobuild.py | |
| parent | 56135c623a865c501ab31cc940c0e22ece2673f4 (diff) | |
| download | golang-c29cace1e8f3260389ea78fa4ef86d80cd5e5275.tar.gz | |
Imported Upstream version 2011.06.09upstream-weekly/2011.06.09
Diffstat (limited to 'misc/dashboard/godashboard/gobuild.py')
| -rw-r--r-- | misc/dashboard/godashboard/gobuild.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/misc/dashboard/godashboard/gobuild.py b/misc/dashboard/godashboard/gobuild.py index ee700c73b..5678f2e1b 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): |
