From 29650b7b7648a35a2fe4fcfd0a073d35fb266c16 Mon Sep 17 00:00:00 2001 From: Yogthos Date: Mon, 9 Sep 2024 15:36:50 -0400 Subject: [PATCH] move hooks to main --- .../resources/io/github/kit_clj/kit/src/clj/core.clj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/deps-template/resources/io/github/kit_clj/kit/src/clj/core.clj b/libs/deps-template/resources/io/github/kit_clj/kit/src/clj/core.clj index a2e4c3f..7a4b7db 100644 --- a/libs/deps-template/resources/io/github/kit_clj/kit/src/clj/core.clj +++ b/libs/deps-template/resources/io/github/kit_clj/kit/src/clj/core.clj @@ -46,9 +46,9 @@ (->> (config/system-config (or (:opts params) (:opts defaults) {})) (ig/expand) (ig/init) - (reset! system)) - (.addShutdownHook (Runtime/getRuntime) (Thread. stop-app)) - (.addShutdownHook (Runtime/getRuntime) (Thread. shutdown-agents))) + (reset! system))) (defn -main [& _] - (start-app)) + (start-app) + (.addShutdownHook (Runtime/getRuntime) (Thread. stop-app)) + (.addShutdownHook (Runtime/getRuntime) (Thread. shutdown-agents)))