This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-14
Channels
- # announcements (10)
- # babashka (14)
- # beginners (51)
- # calva (2)
- # cider (28)
- # cljs-dev (1)
- # cljsrn (3)
- # clojure (185)
- # clojure-dev (15)
- # clojure-europe (6)
- # clojure-italy (2)
- # clojure-nl (6)
- # clojure-uk (45)
- # clojurescript (4)
- # conjure (12)
- # datomic (37)
- # duct (37)
- # figwheel-main (15)
- # helix (23)
- # interceptors (1)
- # jobs (1)
- # jobs-discuss (11)
- # jvm (5)
- # luminus (3)
- # malli (15)
- # off-topic (69)
- # pathom (8)
- # pedestal (2)
- # re-frame (7)
- # reagent (58)
- # reitit (33)
- # remote-jobs (1)
- # rum (14)
- # sci (7)
- # shadow-cljs (15)
- # spacemacs (9)
- # testing (19)
- # timbre (3)
- # tools-deps (14)
Is it possible to halt a single service (for example the http server)? I cannot seem to find a straightforward way of doing this..
"Both `init` and `halt!` can take a second argument of a collection of keys. If this is supplied, the functions will only initiate or halt the supplied keys (and any referenced keys)."
Try this:
(require ' [integrant.repl.state :as state])
(defn halt [keys]
(ig/halt! system keys)
(alter-var-root #'state/system (constantly nil))
:halted)
integrant repl halt doesn't seem to support keys https://github.com/weavejester/integrant-repl/blob/0b99db9447cd0d493ec811e10761f6331488f3d0/src/integrant/repl.clj#L68-L71
Hmm is it correct (in the reloaded workflow sense) to halt some keys but make state/system nil?
Because I wanted to test the disconnect/reconnect functionality for websockets in my web app and didn't want to close the shadow-cljs server (had a stale client error)
I think I have to find a workaround at the shadow-cljs part until we have selective halting in integrant.repl
Yeah ig/halt!
returns nil and maybe this will be a blocking thing to incorporate selective halting in the reloaded workflow
but again I don't have a clear picture on the internals of integrant so maybe it could be done somehow
I think the problem will be that once you ig/init
the :duct/server
again, you'll have a partial system. You'd have to merge that back somehow