mount

tolitius 2018-07-09T03:39:29.000129Z

@richiardiandrea depending on how you "do async", you can use a (mount/running-states) function that returns a set of states that are currently running (i.e. started):

dev=> (mount/running-states)
#{"#'app.example/nrepl" "#'app.conf/config" "#'app.db/conn"}

dev=> (mount/stop #'app.db/conn)
INFO  app.db - disconnecting from  datomic:<mem://mount>
{:stopped ["#'app.db/conn"]}

dev=&gt; (mount/running-states)
#{"#'app.example/nrepl" "#'app.conf/config"}

dev=&gt; ((mount/running-states) "#'app.conf/config")
"#'app.conf/config"
dev=&gt; ((mount/running-states) "#'app.db/conn")
nil

richiardiandrea 2018-07-09T18:10:37.000229Z

Great that is already good, I thought I should roll my own transitions