Fork me on GitHub
#integrant
<
2022-06-03
>
teodorlu10:06:06

Hey! Curious about how you guys handle graceful shutdown with integrant. Just a shutdown hook for (ig/halt! system)?

beetleman10:06:01

if each component shutdown fully on halt

(defn -main
  [& _args]
  (let [app  (ig/init (system/create))
        stop #(ig/halt! app)]
    (log/info :system/started)
    (.addShutdownHook (Runtime/getRuntime) (Thread. stop))))
works quite well for me

👍 1
🙏 1