extras-buildsys/utils package-builder.py,1.9,1.10

Daniel Williams (dcbw) fedora-extras-commits at redhat.com
Fri Jun 24 17:24:23 UTC 2005


Author: dcbw

Update of /cvs/fedora/extras-buildsys/utils
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10323/utils

Modified Files:
	package-builder.py 
Log Message:
2005-06-24  Dan Williams <dcbw at redhat.com>

    * Rework job database handling.  Only 1 thread now has access to
        the job database, the BuildMaster thread.  This should fix issues
        with database locking, timeouts, etc.  sqlite doesn't really like
        multiple threads, plus it doesn't have row locking, only table
        locking.

        So, when things want the BuildMaster to do something, they queue
        up a request and the BuildMaster gets around to it.  Once consequence
        of this change is that job UIDs are not known until the job gets
        added to the database, so we can no longer return the job's UID
        to the client enqueueing the job.

    * BuildClients are also in their own thread now so they don't block the
        BuildMaster.  There are interesting cases where clients can block
        the server while the server is reading data from the client, or if
        the client tracebacks in the middle of an SSL connection.  This should
        help keep the server more robust.  Operational latencies are also
        reduced by this change and the one to the BuildMaster.




Index: package-builder.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/utils/package-builder.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- package-builder.py	17 Jun 2005 16:08:13 -0000	1.9
+++ package-builder.py	24 Jun 2005 17:24:21 -0000	1.10
@@ -61,10 +61,10 @@
     target = args[2]
     use_ssl = config.get('Server', 'use_ssl')
     if use_ssl.lower() == 'true':
-        (e, msg, uid) = server.enqueue(package, tag, target)
+        (e, msg,) = server.enqueue(package, tag, target)
     else:
-        (e, msg, uid) = server.enqueue(email, package, tag, target)
-    print "Package %s enqueued with UID %d" % (package, uid)
+        (e, msg) = server.enqueue(email, package, tag, target)
+    print "Package %s enqueued." % package
 
 
 def enqueue_srpm(server, email, args):
@@ -77,10 +77,10 @@
     target = args[2]
     use_ssl = config.get('Server', 'use_ssl')
     if use_ssl.lower() == 'true':
-        (e, msg, uid) = server.enqueue_srpm(package, srpm, target)
+        (e, msg) = server.enqueue_srpm(package, srpm, target)
     else:
-        (e, msg, uid) = server.enqueue_srpm(email, package, srpm, target)
-    print "Package %s enqueued with UID %d" % (package, uid)
+        (e, msg) = server.enqueue_srpm(email, package, srpm, target)
+    print "Package %s enqueued." % package
 
 
 def list_own_jobs(server, email):




More information about the fedora-extras-commits mailing list