Changes?
This commit is contained in:
parent
9269eb1a7e
commit
40dcb126a9
|
@ -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."))
|
||||
|
|
Loading…
Reference in New Issue