From c0cd43b248794ee5bc0aaa5ef225de9cd97afcd4 Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Tue, 27 Sep 2022 21:13:59 -0700 Subject: [PATCH] Final step --- src/clj/auto_ap/datomic/migrate.clj | 5 ----- src/clj/auto_ap/server.clj | 13 +++++-------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/clj/auto_ap/datomic/migrate.clj b/src/clj/auto_ap/datomic/migrate.clj index 8f2f919d..bba02b8c 100644 --- a/src/clj/auto_ap/datomic/migrate.clj +++ b/src/clj/auto_ap/datomic/migrate.clj @@ -547,8 +547,3 @@ (mount/start (mount/only #{#'conn})) (migrate conn) (mount/stop)) - - -(mount/defstate migrate-start - :start (future (migrate conn)) - :stop (deref migrate-start)) diff --git a/src/clj/auto_ap/server.clj b/src/clj/auto_ap/server.clj index be595a19..3cf5e078 100644 --- a/src/clj/auto_ap/server.clj +++ b/src/clj/auto_ap/server.clj @@ -74,6 +74,7 @@ (catch Exception e (log/warn e)))) +#_{:clj-kondo/ignore [:clojure-lsp/unused-public-var]} (mount/defstate jetty-stats :start (scheduler/every (* 1000 10) collect-jetty-stats) :stop (scheduler/stop jetty-stats)) @@ -118,16 +119,12 @@ (job-close-auto-invoices/-main) :else - (let [without (cond-> [] - (not (env :run-web? )) (into [#'jetty - #'jetty-stats]) - (not (env :run-background?)) (into [#'migrate/migrate-start]))] - (log/info "starting without " without) - + + (do (add-shutdown-hook! shutdown-mount) (start-server :port 9000 :bind "0.0.0.0" #_#_:handler (cider-nrepl-handler)) - #_(alter-var-root #'nrepl.middleware.print/*print-fn* (constantly clojure.pprint/pprint)) - (apply mount/start-without without))))) + (mount/start) + #_(alter-var-root #'nrepl.middleware.print/*print-fn* (constantly clojure.pprint/pprint)))))) (comment )