[llvm-commits] [zorg] r125916 - /zorg/trunk/llvmlab/llvmlab/ci/status.py
Daniel Dunbar
daniel at zuster.org
Fri Feb 18 08:43:34 PST 2011
Author: ddunbar
Date: Fri Feb 18 10:43:33 2011
New Revision: 125916
URL: http://llvm.org/viewvc/llvm-project?rev=125916&view=rev
Log:
llvmlab: Tweak status tracking to not make the build visible until it's data has
been populated.
Modified:
zorg/trunk/llvmlab/llvmlab/ci/status.py
Modified: zorg/trunk/llvmlab/llvmlab/ci/status.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/llvmlab/llvmlab/ci/status.py?rev=125916&r1=125915&r2=125916&view=diff
==============================================================================
--- zorg/trunk/llvmlab/llvmlab/ci/status.py (original)
+++ zorg/trunk/llvmlab/llvmlab/ci/status.py Fri Feb 18 10:43:33 2011
@@ -73,15 +73,10 @@
elif kind in ('add_build', 'completed_build'):
_,name,id = event
build = self.status.build_map[name].get(id)
+ add_build = False
if build is None:
+ add_build = True
build = BuildStatus(name, id, None, None, None, None)
- self.status.build_map[name][id] = build
-
- # Add to the builds list, maintaining order.
- builds = self.status.builders[name]
- builds.append(build)
- if len(builds)>1 and build.number < builds[-2].number:
- builds.sort(key = lambda b: b.number)
# Get the build information.
res = self.status.statusclient.get_json_result((
@@ -91,6 +86,15 @@
build.source_stamp = res['sourceStamp']['revision']
build.start_time = res['times'][0]
build.end_time = res['times'][1]
+
+ if add_build:
+ # Add to the builds list, maintaining order.
+ self.status.build_map[name][id] = build
+ builds = self.status.builders[name]
+ builds.append(build)
+ if (len(builds) > 1 and
+ build.number < builds[-2].number):
+ builds.sort(key = lambda b: b.number)
else:
# FIXME: Use flask logging APIs.
print >>sys.stderr,"warning: unknown event '%r'" % (event,)
More information about the llvm-commits
mailing list