duct-framework / core

The core library of the Duct framework
75 stars 21 forks source link

`exec-config` could save a reference to the started system #40

Closed vemv closed 7 months ago

vemv commented 2 years ago

Hi,

it appears to be hard to get a handle of a production Integrant system, outside of the context of a http request, under Duct.

This would facilitate one-off repl ops.

We're using https://github.com/duct-framework/core/blob/2816b7273011ca0d119141210fb7fe1c9599176b/src/duct/core.clj#L230-L242 as part of our setup.

The problem boils down to (ig/init keys) not persisting its result to some top-level var.

Is there some preferred approach to getting a repl-friendly prod handle, or should this defn be simply improved?

Thanks - V

weavejester commented 2 years ago

I don't think I want to encourage REPLs into running production services. However, exec-config is more a convenience function, and you're welcome to make your own with a REPL hook if you so choose.