extras-buildsys/server UserInterface.py,1.6,1.7

Daniel Williams (dcbw) fedora-extras-commits at redhat.com
Fri Jun 24 10:49:28 UTC 2005


Author: dcbw

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

Modified Files:
	UserInterface.py 
Log Message:
Return _last_ query result's job ID, since if we submit two jobs closely together they may have the same timestamp and other info


Index: UserInterface.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/server/UserInterface.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- UserInterface.py	17 Jun 2005 03:10:29 -0000	1.6
+++ UserInterface.py	24 Jun 2005 10:49:26 -0000	1.7
@@ -71,7 +71,10 @@
                 ' buildreq="%s" AND time_submitted=%d AND status="waiting"' \
                 % (email, package, cvs_tag, target, buildreq, time))
         self.dbcx.commit()
-        item = self.curs.fetchone()
+        data = self.curs.fetchall()
+        # If two of the same job are submitted close together, we need
+        # to make sure we pick the last result to get the correct one
+        item = data[len(data) - 1]
         return item['uid']
 
 




More information about the fedora-extras-commits mailing list