Closed kendagriff closed 5 months ago
There isn't a way to access a system map in production, as it's not intended that a production system be interacted with in that way. That's not to say you couldn't build one, replacing the -main
function with something of your own, but that's not something Duct provides.
Do you recommend a separate Integrant environment altogether for accessing production-level resources?
I'm afraid I don't entirely understand what you mean by that.
The intent is that inspection at production is handled via logging, rather than by accessing a REPL.
Okay. We decided to take this approach via Integrant-REPL:
(defn- repl-enabled-exec-config
"In Duct you typically call duct/exec-config to start the system. Here it is being
blended with integrant-repl/go to give us REPL access in production."
[config profiles keys]
(ir/set-prep! #(duct/prep-config config profiles))
(ir/go keys)
(duct/await-daemons is/system))
Hi @weavejester,
What is the appropriate way to access a live Integrant system map via nrepl when using
duct/exec-configs
? In development withintegrant-repl
we're able to invokeintegrant.repl/go
, then inspectintegrant.repl.state/system
, but we can't seem to find a similar approach with Duct in production.Any advice?