diff options
author | Christopher Baines <mail@cbaines.net> | 2022-10-09 11:53:01 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2022-10-09 11:53:01 +0100 |
commit | 7912b9bfe3d40f6f5393d764c6a18cbdb4b6880e (patch) | |
tree | ff2cb0a2fb18f99a5bcc0336b5f9dd70b093e4b4 /guix-build-coordinator/client-communication.scm | |
parent | ed52f0bb40f5f2d771740c923540c0d8f6d3f1f3 (diff) | |
download | build-coordinator-7912b9bfe3d40f6f5393d764c6a18cbdb4b6880e.tar build-coordinator-7912b9bfe3d40f6f5393d764c6a18cbdb4b6880e.tar.gz |
Improve listing agent build allocation plans
Diffstat (limited to 'guix-build-coordinator/client-communication.scm')
-rw-r--r-- | guix-build-coordinator/client-communication.scm | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/guix-build-coordinator/client-communication.scm b/guix-build-coordinator/client-communication.scm index 9c13e76..aa5d9f0 100644 --- a/guix-build-coordinator/client-communication.scm +++ b/guix-build-coordinator/client-communication.scm @@ -50,6 +50,7 @@ request-builds-list request-output-details request-agent-details + request-agent-build-allocation-plan request-agents-list request-failed-builds-with-blocking-count-list send-create-agent-request @@ -253,12 +254,15 @@ (allocated_builds . ,(list->vector (datastore-list-agent-builds datastore - agent-id))) - (build_allocation_plan . ,(list->vector - (datastore-list-allocation-plan-builds - datastore - agent-id - 2048))))))) ; TODO Do something with this + agent-id))))))) + (('GET "agent" agent-id "build_allocation_plan") + (let ((agent-details (datastore-find-agent datastore agent-id))) + (render-json + `((build_allocation_plan + . ,(list->vector + (datastore-list-allocation-plan-builds + datastore + agent-id))))))) (('POST "agent" agent-id "passwords") (let ((password (new-agent-password datastore @@ -682,6 +686,11 @@ 'GET (string-append "/agent/" agent-id))) +(define (request-agent-build-allocation-plan coordinator-uri agent-id) + (send-request coordinator-uri + 'GET + (string-append "/agent/" agent-id "/build_allocation_plan"))) + (define (request-agents-list coordinator-uri) (send-request coordinator-uri 'GET |