Fork me on GitHub
#mount
<
2020-05-11
>
Viktor13:05:31

Does anyone know if you can set ^:dynamic on a mount defstate? I’m trying to use binding on a defstate to prevent accessing my db state directly when I have a transaction going with jdbc/with-db-transaction

mike_ananev14:05:41

@viktor.holmberg Yes, you can set ^:dynamic on defstate.

(mount/defstate ^:dynamic *http-server*
  :start (start (:web-server conf/*config*))
  :stop (stop http-server))

Viktor14:05:26

Sick!! Thanks a lot for your help 🙏