forked from LibreGaming/matchbot
Remove use of state container in main function
Since the main function will only ever start and stop one system, this commit simplifies the main function to use a single lexical binding for the system state rather than creating an Atom. Signed-off-by: Sebastian Crane <seabass-labrax@gmx.com>
This commit is contained in:
parent
856432516c
commit
56094478db
|
@ -62,7 +62,6 @@
|
|||
(swap! system-atom start)))
|
||||
|
||||
(defn -main [& args]
|
||||
(let [main-system (atom (system/system))]
|
||||
(swap! main-system system/start)
|
||||
(let [main-system (system/start nil)]
|
||||
(.addShutdownHook (Runtime/getRuntime)
|
||||
(Thread. (partial swap! main-system stop)))))
|
||||
(Thread. #(stop main-system)))))
|
||||
|
|
Loading…
Reference in New Issue