diff options
author | Christopher Baines <mail@cbaines.net> | 2020-06-19 16:55:01 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-06-19 16:55:01 +0100 |
commit | 89c2823f1a332da9e9ea3a4f84ef27cce7e22a3a (patch) | |
tree | c58d0c732100c67e71fee2e5438154153c374fc7 /guix-build-coordinator/agent-messaging | |
parent | d1d8132c6f8c0fb4d2335472d487635e0284cdf6 (diff) | |
download | build-coordinator-89c2823f1a332da9e9ea3a4f84ef27cce7e22a3a.tar build-coordinator-89c2823f1a332da9e9ea3a4f84ef27cce7e22a3a.tar.gz |
Handle the system more explicitly when fetching builds
Also support fetching builds for specific systems from the Guix Data Service.
Diffstat (limited to 'guix-build-coordinator/agent-messaging')
-rw-r--r-- | guix-build-coordinator/agent-messaging/http.scm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/guix-build-coordinator/agent-messaging/http.scm b/guix-build-coordinator/agent-messaging/http.scm index e7c17aa..f7459ad 100644 --- a/guix-build-coordinator/agent-messaging/http.scm +++ b/guix-build-coordinator/agent-messaging/http.scm @@ -292,7 +292,10 @@ port. Also, the port used can be changed by passing the --port option.\n" (if (authenticated? uuid request) (let* ((json-body (json-string->scm (utf8->string body))) (count (assoc-ref json-body "count")) - (builds (fetch-builds build-coordinator uuid count))) + (systems (assoc-ref json-body "systems")) + (builds (fetch-builds build-coordinator uuid + (vector->list systems) + count))) (render-json `((builds . ,(list->vector builds))))) (render-json @@ -696,11 +699,13 @@ port. Also, the port used can be changed by passing the --port option.\n" #:succeed-on-access-denied-retry? #t)) (define* (fetch-builds-for-agent coordinator-uri agent-uuid password + systems #:key (count 1)) (vector->list (assoc-ref (coordinator-http-request coordinator-uri agent-uuid password (string-append "/agent/" agent-uuid "/fetch-builds") - #:body `((count . ,count)) + #:body `((count . ,count) + (systems . ,(list->vector systems))) #:method 'POST) "builds"))) |