Fork me on GitHub
#clojure-uk
<
2019-07-28
>
dharrigan07:07:27

One thing to clarify tho', if I'm initialising a datasource (for that's what I'm doing), I store that in an atom in the namespace, then deref when I need it in other functions. Is that right?

Ben Hammond08:07:19

I would create an integrant key just for that datasource; initialise it using

(defmethod integrant.core/init-key :davids/datasource
[k v]
...
reference it from within :ig/system config as #ig/ref :davids/datasource

dharrigan08:07:49

Yes, did that thank you. It's very good integrant 🙂

dharrigan21:07:54

In the end I've decided to use alter-var-root