aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator/agent-messaging/http.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix-build-coordinator/agent-messaging/http.scm')
-rw-r--r--guix-build-coordinator/agent-messaging/http.scm14
1 files changed, 10 insertions, 4 deletions
diff --git a/guix-build-coordinator/agent-messaging/http.scm b/guix-build-coordinator/agent-messaging/http.scm
index 23c119c..9aa7f55 100644
--- a/guix-build-coordinator/agent-messaging/http.scm
+++ b/guix-build-coordinator/agent-messaging/http.scm
@@ -71,10 +71,13 @@ if there was no request body."
fixed/read-request-body)
(define (http-agent-messaging-start-server port host secret-key-base
- datastore)
+ datastore hooks)
(define build-allocator-channel
(make-build-allocator-channel datastore))
+ (define hook-channel
+ (make-hook-channel datastore hooks))
+
(define (trigger-build-allocation)
(put-message build-allocator-channel #t))
@@ -94,7 +97,8 @@ if there was no request body."
body
secret-key-base
datastore
- trigger-build-allocation)))
+ trigger-build-allocation
+ hook-channel)))
'http
(list #:host host
#:port port)))
@@ -131,7 +135,8 @@ port. Also, the port used can be changed by passing the --port option.\n"
body
secret-key-base
datastore
- trigger-build-allocation)
+ trigger-build-allocation
+ hook-channel)
(define (authenticated? uuid request)
(let* ((authorization-base64
(match (assq-ref (request-headers request)
@@ -183,7 +188,8 @@ port. Also, the port used can be changed by passing the --port option.\n"
(datastore-agent-for-build datastore uuid)))
(if (authenticated? agent-id-for-build request)
(begin
- (handle-build-result datastore agent-id-for-build uuid
+ (handle-build-result datastore hook-channel
+ agent-id-for-build uuid
(json-string->scm (utf8->string body)))
;; Trigger build allocation, as the result of this build could
;; change the allocation