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
|
||||
|
||||
(defn start []
|
||||
(mount/start)
|
||||
:started)
|
||||
(mount/start))
|
||||
|
||||
(defn stop []
|
||||
(mount/stop)
|
||||
:stopped)
|
||||
(mount/stop))
|
||||
|
||||
(defn refresh []
|
||||
(stop)
|
||||
|
|
|
|||
|
|
@ -73,14 +73,15 @@
|
|||
(defn- bring [states fun order]
|
||||
(->> states
|
||||
(sort-by (comp :order meta) order)
|
||||
(map #(fun % (meta %)))))
|
||||
(map #(fun % (meta %)))
|
||||
doall))
|
||||
|
||||
(defn start [& states]
|
||||
(let [states (or states (find-all-states))]
|
||||
(doall
|
||||
(bring states up <))))
|
||||
(bring states up <)
|
||||
:started))
|
||||
|
||||
(defn stop [& states]
|
||||
(let [states (or states (find-all-states))]
|
||||
(doall
|
||||
(bring states down >))))
|
||||
(bring states down >)
|
||||
:stopped))
|
||||
|
|
|
|||
Loading…
Reference in a new issue