about summary refs log tree commit diff
path: root/scripts/build-remote.pl.in
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2009-03-29T18·00+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2009-03-29T18·00+0000
commit737423a89c4b5f666fb4daf61775764b66911cf1 (patch)
tree883fee6aebdc231a721f372753f21d44ba020226 /scripts/build-remote.pl.in
parent47706e3924cf592a4e0085eb2e45f0e84b67f933 (diff)
* Use polling to wait for a remote build slot when using a build hook
  (that is, call the build hook with a certain interval until it
  accepts the build).
* build-remote.pl was totally broken: for all system types other than
  the local system type, it would send all builds to the *first*
  machine of the appropriate type.

Diffstat (limited to 'scripts/build-remote.pl.in')
-rwxr-xr-xscripts/build-remote.pl.in7
1 files changed, 2 insertions, 5 deletions
diff --git a/scripts/build-remote.pl.in b/scripts/build-remote.pl.in
index ef8d3bbea02c..03bceb884f2a 100755
--- a/scripts/build-remote.pl.in
+++ b/scripts/build-remote.pl.in
@@ -23,8 +23,7 @@ use English '-no_match_vars';
 
 my $loadIncreased = 0;
 
-my ($amWilling, $localSystem, $neededSystem, $drvPath, $mustRun, $maxSilentTime) = @ARGV;
-$mustRun = 0 unless defined $mustRun;
+my ($amWilling, $localSystem, $neededSystem, $drvPath, $maxSilentTime) = @ARGV;
 $maxSilentTime = 0 unless defined $maxSilentTime;
 
 sub sendReply {
@@ -87,12 +86,10 @@ LOOP: foreach my $cur (@machines) {
         # We have a machine of the right type.  Try to get a lock on
         # one of the machine's lock files.
         my $slot = 0;
-        while ($slot < $cur->{maxJobs} || ($mustRun && !$canBuildLocally)) {
+        while ($slot < $cur->{maxJobs}) {
             my $slotLock = "$currentLoad/" . $cur->{systemType} . "-" . $cur->{hostName} . "-$slot";
             open SLOTLOCK, ">>$slotLock" or die;
             if (flock(SLOTLOCK, LOCK_EX | LOCK_NB)) {
-                print STDERR "warning: exceeding maximum load on " . $cur->{systemType} . "\n"
-                    if $slot >= $cur->{maxJobs};
                 $machine = $cur;
                 last LOOP;
             }