I am wondering if there is any way to hook specific start up event for when the Datomic application is reinitialized. Any suggestions?
Thanks,
Hadil
I am wondering if there is any way to hook specific start up event for when the Datomic application is reinitialized. Any suggestions?
Thanks,
Hadil
I handled this by adding ring middleware to a request handler ion that checked if initialization code had already been run and then ran it if needed. (Specifically, I believe it just called mount.core/start
).
I can’t make this work with simple lambda ions. It seems that the code is loaded before mount is started, so I get a NullPointerException. I don’t really know how to fix this.
I do my one-time (per process) start up in a delay. The Ions deref the delay to get at the shared state.