aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-05-06 12:29:50 +0100
committerChristopher Baines <mail@cbaines.net>2023-05-06 12:29:50 +0100
commitd030cace841a224d74dd3ec3ae12a14f8d516399 (patch)
treeb5edad0b39032b5ea08a4bade06971c3e5260d15
parentbabee95acd23105e1fcfa5dc0bb1f90bcd10d07e (diff)
downloadbuild-coordinator-d030cace841a224d74dd3ec3ae12a14f8d516399.tar
build-coordinator-d030cace841a224d74dd3ec3ae12a14f8d516399.tar.gz
Include system uptime in datastore-find-agent-status
-rw-r--r--guix-build-coordinator/datastore/sqlite.scm7
1 files changed, 5 insertions, 2 deletions
diff --git a/guix-build-coordinator/datastore/sqlite.scm b/guix-build-coordinator/datastore/sqlite.scm
index 069a18a..eba98a6 100644
--- a/guix-build-coordinator/datastore/sqlite.scm
+++ b/guix-build-coordinator/datastore/sqlite.scm
@@ -804,7 +804,8 @@ UPDATE agents SET active = :active WHERE id = :uuid"
(sqlite-prepare
db
"
-SELECT status, load_average_1min, timestamp, processor_count
+SELECT status, load_average_1min, system_uptime,
+ timestamp, processor_count
FROM agent_status
WHERE agent_id = :agent_id"
#:cache? #t)))
@@ -814,10 +815,12 @@ WHERE agent_id = :agent_id"
#:agent_id agent-id)
(match (sqlite-step-and-reset statement)
- (#(status 1min_load_average timestamp
+ (#(status 1min_load_average
+ system_uptime timestamp
processor_count)
`((status . ,status)
(1min_load_average . ,1min_load_average)
+ (system_uptime . ,system_uptime)
(timestamp . ,timestamp)
(processor_count . ,processor_count)))
(_ #f))))))