@kevin.van.rooijen What a good place to manually save the state in an atom?
I just created a db.clj or config.clj file and stored it there (with defonce)
@kevin.van.rooijen Can you show me your code?
Sorry, I literally can't because I don't work for that company anymore and don't have access to the code 😅 But something along these lines:
(ns simple.main
(:gen-class)
(:require [duct.core :as duct]))
(defonce stored-config (atom nil))
(defonce stored-system (atom nil))
(duct/load-hierarchy)
(defn -main [& args]
(let [keys (or (duct/parse-keys args) [:duct/daemon])
profiles [:duct.profile/prod]
config (-> (duct/resource "simple/config.edn")
(duct/read-config)
(duct/prep-config profiles))
system (ig/init config keys)]
(reset! stored-config config)
(reset! stored-system system)
(duct/await-daemons system)))I see. Thank you!