1
0

secrets/subscriber don't depend on the services we're watching

this means a watched service can stop and start without killing
the subscriber, and that we can watch for services that don't
yet exist
This commit is contained in:
Daniel Barlow 2025-03-09 20:35:40 +00:00
parent d1f87a56e0
commit d4e46dbe28
2 changed files with 2 additions and 6 deletions

View File

@ -56,8 +56,5 @@ service.overrideAttrs (o: {
buildInputs = (lim.orEmpty o.buildInputs) ++ optional (watch != []) watcher;
dependencies =
(lim.orEmpty o.dependencies)
# ++ optionals
# (watch != [])
# ([ watcher ] ++ watched-services);
;
++ optional (watch != []) watcher;
})

View File

@ -71,7 +71,7 @@
(fn open-services [output-references]
(collect [s p (pairs output-references)]
(values (assert (svc.open (.. s "/.outputs"))) p)))
(values (svc.open (.. s "/.outputs")) p)))
(fn run []
(let [trees {}
@ -89,7 +89,6 @@
(each [service paths (pairs services)]
(let [new-tree (service:output ".")]
(when (changed? paths (. trees service) new-tree)
(print "watched path event:" action controlled-service)
(do-action action controlled-service))))))))