aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-03-22 17:00:23 +0000
committerChristopher Baines <mail@cbaines.net>2023-03-22 17:00:23 +0000
commit5a4024a3551d43cbc35a7d1887c9a792af6104f9 (patch)
tree78df21b5010c183c18d08cc7b0b2f17959fa0235
parent4482fb35d36a060eb991f7dcadc41d33164f7fa9 (diff)
downloadbuild-coordinator-5a4024a3551d43cbc35a7d1887c9a792af6104f9.tar
build-coordinator-5a4024a3551d43cbc35a7d1887c9a792af6104f9.tar.gz
Fix status load average handling
As the keys in JSON are strings.
-rw-r--r--guix-build-coordinator/agent-messaging/http.scm2
-rw-r--r--guix-build-coordinator/agent-messaging/http/server.scm2
2 files changed, 2 insertions, 2 deletions
diff --git a/guix-build-coordinator/agent-messaging/http.scm b/guix-build-coordinator/agent-messaging/http.scm
index 74f7c9c..992768f 100644
--- a/guix-build-coordinator/agent-messaging/http.scm
+++ b/guix-build-coordinator/agent-messaging/http.scm
@@ -267,7 +267,7 @@
#:body `((status . ,status)
,@(if 1min-load-average
`((load_average
- . ((1 . ,1min-load-average))))
+ . (("1" . ,1min-load-average))))
'()))))
args))
diff --git a/guix-build-coordinator/agent-messaging/http/server.scm b/guix-build-coordinator/agent-messaging/http/server.scm
index 75b1d77..016cecf 100644
--- a/guix-build-coordinator/agent-messaging/http/server.scm
+++ b/guix-build-coordinator/agent-messaging/http/server.scm
@@ -253,7 +253,7 @@ port. Also, the port used can be changed by passing the --port option.\n"
(status (assoc-ref json-body "status"))
(1min-load-average (and=> (assoc-ref json-body "load_average")
(lambda (load-average)
- (assoc-ref load-average 1)))))
+ (assoc-ref load-average "1")))))
(update-agent-status build-coordinator uuid
status 1min-load-average))