mount

2020-03-12T17:19:32.003300Z

Hi. I'm new here — just joined a company that's using mount. :-) What's the recommended way to check whether a state is running? I think I want something like (defstate foo :start ... :stop (when <running> ...))

tolitius 2020-03-12T20:10:17.006Z

in order to checks which states are running:

(mount/running-states)
will return a set of states that are currently running but to your specific example, foo is available as a known reference "at a :stop function", so depending on what type foo is, you can do something like that:
(defstate server :start (start-server)
                 :stop (when server (.stop server)))