summaryrefslogtreecommitdiff
path: root/guix/scripts/offload.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludovic.courtes@inria.fr>2017-04-21 17:18:54 +0200
committerLudovic Courtès <ludo@gnu.org>2017-04-21 17:23:37 +0200
commitba97e454bfbc168098212b37881b50b4fe6e1eb2 (patch)
tree19a30366320107a4af39efa26c2492cdb626804a /guix/scripts/offload.scm
parent3dff90ce34448551bc82a6a7262837c0561a4691 (diff)
offload: Avoid using '_' as a 'match' pattern.
* guix/scripts/offload.scm (host-key->type+key, machine-load) (process-request, guix-offload): Do not use '_' as a 'match' pattern.
Diffstat (limited to 'guix/scripts/offload.scm')
-rw-r--r--guix/scripts/offload.scm14
1 files changed, 7 insertions, 7 deletions
diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm
index 6a4ae28689..acdfb81698 100644
--- a/guix/scripts/offload.scm
+++ b/guix/scripts/offload.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -148,7 +148,7 @@ its key type as a symbol, and the actual base64-encoded string."
(string->symbol (string-drop type 4))))
(match (string-tokenize host-key)
- ((type key _)
+ ((type key x)
(values (type->symbol type) key))
((type key)
(values (type->symbol type) key))))
@@ -403,7 +403,7 @@ allowed on MACHINE. Return +∞ if MACHINE is unreachable."
(if (eof-object? line)
+inf.0 ;MACHINE does not respond, so assume it is infinitely loaded
(match (string-tokenize line)
- ((one five fifteen . _)
+ ((one five fifteen . x)
(let* ((raw (string->number five))
(jobs (build-machine-parallel-builds machine))
(normalized (/ raw jobs)))
@@ -411,9 +411,9 @@ allowed on MACHINE. Return +∞ if MACHINE is unreachable."
(normalized: ~s)~%"
(build-machine-name machine) raw normalized)
normalized))
- (_
+ (x
+inf.0))))) ;something's fishy about MACHINE, so avoid it
- (_
+ (x
+inf.0))) ;failed to connect to MACHINE, so avoid it
(define (machine-lock-file machine hint)
@@ -503,7 +503,7 @@ allowed on MACHINE. Return +∞ if MACHINE is unreachable."
(()
;; We'll never be able to match REQS.
(display "# decline\n"))
- ((_ ...)
+ ((x ...)
(let ((machine (choose-build-machine candidates)))
(if machine
(begin
@@ -671,7 +671,7 @@ machine."
build-machine-name)))
((file) (values file (const #t)))
(() (values %machine-file (const #t)))
- (_ (leave (_ "wrong number of arguments~%"))))))
+ (x (leave (_ "wrong number of arguments~%"))))))
(check-machine-availability (or file %machine-file) pred))))
(("--version")
(show-version-and-exit "guix offload"))