offload: Fix 'choose-build-machine' for several machines.
* guix/scripts/offload.scm (choose-build-machine)[undecorate]: Turn into a two-argument procedure.
This commit is contained in:
parent
3c0e6e6080
commit
1a8ea0a188
|
@ -466,10 +466,14 @@ allowed on MACHINE."
|
||||||
machines))
|
machines))
|
||||||
|
|
||||||
(define (undecorate pred)
|
(define (undecorate pred)
|
||||||
(match-lambda
|
(lambda (a b)
|
||||||
((machine slot)
|
(match a
|
||||||
(and (pred machine)
|
((machine1 slot1)
|
||||||
(list machine slot)))))
|
(match b
|
||||||
|
((machine2 slot2)
|
||||||
|
(if (pred machine1 machine2)
|
||||||
|
(list machine1 slot1)
|
||||||
|
(list machine2 slot2))))))))
|
||||||
|
|
||||||
(let ((machines+slots (sort machines+slots
|
(let ((machines+slots (sort machines+slots
|
||||||
(undecorate machine-less-loaded-or-faster?))))
|
(undecorate machine-less-loaded-or-faster?))))
|
||||||
|
|
Loading…
Reference in New Issue