[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Ludovic Courtès |
Date: |
Wed, 13 Sep 2023 13:05:39 -0400 (EDT) |
branch: wip-actors
commit f6645164ba6d3791bac6e3f2b2f64198aa43d572
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed Sep 13 12:49:28 2023 +0200
http: /admin/specification/edit notifies jobset via the bridge.
* src/cuirass/http.scm (url-handler): Send ‘update-jobset’ message to
BRIDGE.
* src/cuirass/scripts/register.scm (bridge): Handle ‘update-jobset’
messages.
---
src/cuirass/http.scm | 9 ++++++++-
src/cuirass/scripts/register.scm | 5 +++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/cuirass/http.scm b/src/cuirass/http.scm
index 79962b4..55c96b2 100644
--- a/src/cuirass/http.scm
+++ b/src/cuirass/http.scm
@@ -696,12 +696,19 @@ passed, only display JOBS targeting this SYSTEM."
;; using the web interface. Use the outputs and notifications from the
;; existing specification.
- ;; FIXME: Notify the jobset registry in the 'cuirass register' process.
(db-add-or-update-specification
(specification
(inherit spec)
(build-outputs old-outputs)
(notifications old-notifications)))
+
+ (if bridge
+ (begin
+ (write `(update-jobset ,(string->symbol name))
+ bridge)
+ (newline bridge))
+ (log-error "cannot notify bridge of modification of jobset '~a'"
+ name))
(respond
(build-response #:code 302
#:headers
diff --git a/src/cuirass/scripts/register.scm b/src/cuirass/scripts/register.scm
index 70d54e2..9fab157 100644
--- a/src/cuirass/scripts/register.scm
+++ b/src/cuirass/scripts/register.scm
@@ -123,6 +123,11 @@
(match (db-get-specification name)
(#f (log-warning "requested spec '~a' not found" name))
(spec (register-jobset registry spec))))
+ (`(update-jobset ,name)
+ (let ((spec (db-get-specification name)))
+ (if spec
+ (update-jobset registry spec)
+ (log-warning "cannot update non-existent spec '~a'"
name))))
(`(trigger-jobset ,name)
(match (lookup-jobset registry name)
(#f (log-warning "requested jobset '~a' not found" name))
- branch wip-actors created (now 0346ac2), Ludovic Courtès, 2023/09/13
- [no subject], Ludovic Courtès, 2023/09/13
- [no subject], Ludovic Courtès, 2023/09/13
- [no subject], Ludovic Courtès, 2023/09/13
- [no subject], Ludovic Courtès, 2023/09/13
- [no subject], Ludovic Courtès, 2023/09/13
- [no subject],
Ludovic Courtès <=
- [no subject], Ludovic Courtès, 2023/09/13
- [no subject], Ludovic Courtès, 2023/09/13
- [no subject], Ludovic Courtès, 2023/09/13
- [no subject], Ludovic Courtès, 2023/09/13
- [no subject], Ludovic Courtès, 2023/09/13
- [no subject], Ludovic Courtès, 2023/09/13
- [no subject], Ludovic Courtès, 2023/09/13
- [no subject], Ludovic Courtès, 2023/09/13