start/stop return :started/:stopped
This commit is contained in:
parent
7c6262ad7d
commit
64042919d1
2 changed files with 8 additions and 9 deletions
|
|
@ -17,12 +17,10 @@
|
||||||
[app :refer [create-nyse-schema find-orders add-order]])) ;; <<<< replace this your "app" namespace(s) you want to be available at REPL time
|
[app :refer [create-nyse-schema find-orders add-order]])) ;; <<<< replace this your "app" namespace(s) you want to be available at REPL time
|
||||||
|
|
||||||
(defn start []
|
(defn start []
|
||||||
(mount/start)
|
(mount/start))
|
||||||
:started)
|
|
||||||
|
|
||||||
(defn stop []
|
(defn stop []
|
||||||
(mount/stop)
|
(mount/stop))
|
||||||
:stopped)
|
|
||||||
|
|
||||||
(defn refresh []
|
(defn refresh []
|
||||||
(stop)
|
(stop)
|
||||||
|
|
|
||||||
|
|
@ -73,14 +73,15 @@
|
||||||
(defn- bring [states fun order]
|
(defn- bring [states fun order]
|
||||||
(->> states
|
(->> states
|
||||||
(sort-by (comp :order meta) order)
|
(sort-by (comp :order meta) order)
|
||||||
(map #(fun % (meta %)))))
|
(map #(fun % (meta %)))
|
||||||
|
doall))
|
||||||
|
|
||||||
(defn start [& states]
|
(defn start [& states]
|
||||||
(let [states (or states (find-all-states))]
|
(let [states (or states (find-all-states))]
|
||||||
(doall
|
(bring states up <)
|
||||||
(bring states up <))))
|
:started))
|
||||||
|
|
||||||
(defn stop [& states]
|
(defn stop [& states]
|
||||||
(let [states (or states (find-all-states))]
|
(let [states (or states (find-all-states))]
|
||||||
(doall
|
(bring states down >)
|
||||||
(bring states down >))))
|
:stopped))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue