extras-buildsys/builder Builder.py,1.16,1.17

Daniel Williams (dcbw) fedora-extras-commits at redhat.com
Mon Jun 26 17:35:39 UTC 2006


Author: dcbw

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

Modified Files:
	Builder.py 
Log Message:
2006-06-26  Dan Williams  <dcbw at redhat.com>

    * builder/Builder.py
        - Add a configure option for setting maximum number of concurrent
            jobs if the autoconfigured number is inappropriate;
            "max_jobs" in the [General] section




Index: Builder.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/builder/Builder.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- Builder.py	29 May 2006 20:26:32 -0000	1.16
+++ Builder.py	26 Jun 2006 17:35:36 -0000	1.17
@@ -70,7 +70,17 @@
     """ Abstract builder base object """
     def __init__(self, cfg):
         self._cfg = cfg
+
         self._max_slots = _determine_max_jobs()
+        # Check for user-configured override of max jobs
+        if cfg.has_option("General", "max_jobs"):
+            max_slots = cfg.get_int("General", "max_jobs")
+            if max_slots < 1 or max_slots > 100:
+                self._log("Invalid configured max job count; using " \
+                        "autoconfigured count %d instead." % self._max_slots)
+            else:
+                self._max_slots = max_slots
+
         self._seq_gen = Commands.SequenceGenerator()
         self._queued_cmds = []
 




More information about the fedora-extras-commits mailing list