]> git.pld-linux.org Git - projects/pld-builder.new.git/commitdiff
Add separate locking for tasks with prio (-1000,0) and no locking at all for tasks...
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 30 Oct 2013 12:52:53 +0000 (13:52 +0100)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 30 Oct 2013 12:52:53 +0000 (13:52 +0100)
PLD_Builder/rpm_builder.py

index 9cf80a8a7dd4595c4d16474a89588e81949108e0..b41517bcbaaefe240991fdb29b8dd0c8071e3a53 100644 (file)
@@ -374,6 +374,12 @@ def main_for(builder):
         f.close()
         l.close()
     else:
+        # be able to avoid locking with very low priority
+        if req.priority > -1000:
+            # allow only one build in given builder at once
+            if not lock.lock("building-high-priority-rpm-for-%s" % config.builder, non_block = 1):
+                return
+
         msg = "HIGH PRIORITY: "
 
     msg += "handling request %s (%d) for %s from %s, priority %s" \
This page took 0.121756 seconds and 4 git commands to generate.