From 40dcb126a9f8234ea27976cf80c579a6a4e7b543 Mon Sep 17 00:00:00 2001 From: niten Date: Sat, 23 Mar 2024 11:33:12 -0700 Subject: [PATCH] Changes? --- src/pricebot/core.clj | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/pricebot/core.clj b/src/pricebot/core.clj index 2950173..dc82864 100644 --- a/src/pricebot/core.clj +++ b/src/pricebot/core.clj @@ -192,18 +192,19 @@ bebot-auth-token-file bebot-channel-id notify-user]} (get-args required-keys args) - logger (bebot-log/make-logger bebot-url - (-> bebot-auth-token-file slurp str/trim-newline) - bebot-channel-id - notify-user) - checks (create-checks logger) - bot (reify-bot exchange-host - (-> currency str/lower-case keyword) - checks) + logger (bebot-log/make-logger bebot-url + (-> bebot-auth-token-file slurp str/trim-newline) + bebot-channel-id + notify-user) + checks (create-checks logger) + bot (reify-bot exchange-host + (-> currency str/lower-case keyword) + checks) shutdown (chan)] (.addShutdownHook (Runtime/getRuntime) (Thread. (fn [] (println "Stopping pricebot...") + (log/notify! logger (str "Shutting down pricebot for " (name currency) ".")) (stop! bot) (>!! shutdown true)))) (log/notify! logger (str "Hi! I'm going to start watching the price of " (name currency) " for you."))