guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] offload: Fix sorting bug in 'choose-build-machine'


From: Mark H Weaver
Subject: [PATCH] offload: Fix sorting bug in 'choose-build-machine'
Date: Wed, 17 Jun 2015 14:19:14 -0400

I noticed that hydra was often offloading builds to the most heavily
loaded of the two MIPS machines.  This patch should fix the problem.

     Mark

>From c2deca27e9310b53457849a5cdb3010989e027ef Mon Sep 17 00:00:00 2001
From: Mark H Weaver <address@hidden>
Date: Wed, 17 Jun 2015 13:55:21 -0400
Subject: [PATCH] offload: Fix sorting bug in 'choose-build-machine'.

* guix/scripts/offload.scm (choose-build-machine)[undecorate]: Return the
  boolean result of pred instead of the best machine+slot.
---
 guix/scripts/offload.scm | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm
index e651257..e6be8b4 100644
--- a/guix/scripts/offload.scm
+++ b/guix/scripts/offload.scm
@@ -606,9 +606,7 @@ defines a total order on machines.)"
           ((machine1 slot1)
            (match b
              ((machine2 slot2)
-              (if (pred machine1 machine2)
-                  (list machine1 slot1)
-                  (list machine2 slot2))))))))
+              (pred machine1 machine2)))))))
 
     (let loop ((machines+slots
                 (sort machines+slots
-- 
2.4.3


reply via email to

[Prev in Thread] Current Thread [Next in Thread]