diff options
author | Christopher Baines <mail@cbaines.net> | 2023-03-23 10:00:04 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-03-23 10:00:04 +0000 |
commit | 024761d432ff84e197b49846c71ac34f5703df38 (patch) | |
tree | bfa0419b7af06cbf50558d02bd22cc16325eab8e | |
parent | 5a4024a3551d43cbc35a7d1887c9a792af6104f9 (diff) | |
download | build-coordinator-024761d432ff84e197b49846c71ac34f5703df38.tar build-coordinator-024761d432ff84e197b49846c71ac34f5703df38.tar.gz |
Include the timestamp when fetching the agent status from the db
-rw-r--r-- | guix-build-coordinator/datastore/sqlite.scm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/guix-build-coordinator/datastore/sqlite.scm b/guix-build-coordinator/datastore/sqlite.scm index ba4a6d4..c2dc3de 100644 --- a/guix-build-coordinator/datastore/sqlite.scm +++ b/guix-build-coordinator/datastore/sqlite.scm @@ -687,7 +687,7 @@ UPDATE agents SET active = :active WHERE id = :uuid" (sqlite-prepare db " -SELECT status, load_average_1min +SELECT status, load_average_1min, timestamp FROM agent_status WHERE agent_id = :agent_id" #:cache? #t))) @@ -697,11 +697,12 @@ WHERE agent_id = :agent_id" #:agent_id agent-id) (match (sqlite-step statement) - (#(status 1min_load_average) + (#(status 1min_load_average timestamp) (sqlite-reset statement) `((status . ,status) - (1min_load_average . ,1min_load_average))) + (1min_load_average . ,1min_load_average) + (timestamp . ,timestamp))) (_ #f)))))) (define-method (datastore-update-agent-status |