[llvm-commits] [zorg] r167772 - /zorg/trunk/llvmlab/llvmlab/ci/status.py

Daniel Dunbar daniel at zuster.org
Mon Nov 12 14:46:24 PST 2012


Author: ddunbar
Date: Mon Nov 12 16:46:24 2012
New Revision: 167772

URL: http://llvm.org/viewvc/llvm-project?rev=167772&view=rev
Log:
llvmlab: Update for latest buildbot JSON response.
 - Also, make the monitor thread run as a daemon thread.
 - Also, report all buildbot monitor failures as errors.

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=167772&r1=167771&r2=167772&view=diff
==============================================================================
--- zorg/trunk/llvmlab/llvmlab/ci/status.py (original)
+++ zorg/trunk/llvmlab/llvmlab/ci/status.py Mon Nov 12 16:46:24 2012
@@ -48,6 +48,7 @@
 class StatusMonitor(threading.Thread):
     def __init__(self, app, status):
         threading.Thread.__init__(self)
+        self.daemon = True
         self.app = app
         self.status = status
 
@@ -61,10 +62,7 @@
                 print >>os, "*** ERROR: failure in buildbot monitor"
                 print >>os, "\n-- Traceback --"
                 traceback.print_exc(file = os)
-                if self.app.logger:
-                    self.app.logger.warning(os.getvalue())
-                else:
-                    print >>sys.stderr, os.getvalue()
+                self.app.logger.error(os.getvalue())
 
                 # Sleep for a while, then restart.
                 time.sleep(60)
@@ -116,7 +114,10 @@
 
                     if res:
                         build.result = res['results']
-                        build.source_stamp = res['sourceStamp']['revision']
+                        if 'sourceStamps' in res:
+                            build.source_stamp = res['sourceStamps'][0]['revision']
+                        else:
+                            build.source_stamp = res['sourceStamp']['revision']
                         build.start_time = res['times'][0]
                         build.end_time = res['times'][1]
                         build.slave = res['slave']





More information about the llvm-commits mailing list