diff options
author | Christopher Baines <mail@cbaines.net> | 2021-01-31 10:22:22 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2021-01-31 10:22:22 +0000 |
commit | 61cfa8883bcb0537e26c5e44f7116dc516f5590f (patch) | |
tree | afc917367ec145bf02d592db52c1b346253e28d0 /guix-build-coordinator | |
parent | e18deabf94d6274951e96c02338d824c4f495199 (diff) | |
download | build-coordinator-61cfa8883bcb0537e26c5e44f7116dc516f5590f.tar build-coordinator-61cfa8883bcb0537e26c5e44f7116dc516f5590f.tar.gz |
Include tags in the agents response
Diffstat (limited to 'guix-build-coordinator')
-rw-r--r-- | guix-build-coordinator/client-communication.scm | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/guix-build-coordinator/client-communication.scm b/guix-build-coordinator/client-communication.scm index 921cfe9..0ee446a 100644 --- a/guix-build-coordinator/client-communication.scm +++ b/guix-build-coordinator/client-communication.scm @@ -204,7 +204,19 @@ `((builds . ,(list->vector builds)))))) (('GET "agents") (render-json - `((agents . ,(list->vector (datastore-list-agents datastore)))))) + `((agents + . ,(list->vector + (map (lambda (agent) + `(,@agent + (tags . ,(vector-map + (match-lambda* + ((index (key . value)) + `((key . ,key) + (value . ,value)))) + (datastore-fetch-agent-tags + datastore + (assq-ref agent 'uuid)))))) + (datastore-list-agents datastore))))))) (('POST "agents") (let ((uuid (new-agent datastore |