mirror of
https://github.com/penpot/penpot.git
synced 2025-06-06 02:41:38 +02:00
♻️ Refactor exporter state initialization.
This commit is contained in:
parent
4825efb582
commit
abb244c940
12 changed files with 308 additions and 287 deletions
|
@ -21,10 +21,9 @@
|
|||
(defn start
|
||||
[& args]
|
||||
(log/info :msg "initializing")
|
||||
(p/let [browser (bwr/start!)
|
||||
server (http/start! {:browser browser})]
|
||||
(reset! state {:http server
|
||||
:browser browser})))
|
||||
(p/do!
|
||||
(bwr/init)
|
||||
(http/init)))
|
||||
|
||||
(def main start)
|
||||
|
||||
|
@ -35,8 +34,6 @@
|
|||
|
||||
(log/info :msg "stoping")
|
||||
(p/do!
|
||||
(when-let [instance (:browser @state)]
|
||||
(bwr/stop! instance))
|
||||
(when-let [instance (:http @state)]
|
||||
(http/stop! instance))
|
||||
(bwr/stop)
|
||||
(http/stop)
|
||||
(done)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue