Skip to content

Commit

Permalink
whitespace fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
salsakran committed Dec 22, 2016
1 parent 69497a1 commit 59dfe81
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 2 additions & 3 deletions src/metabase/events/metabot_lifecycle.clj
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@
(try
;; if someone updated our slack-token, or metabot was enabled/disabled then react accordingly
(when (and (contains? object :metabot-enabled) (contains? object :slack-token))

(let [{:keys [slack-token metabot-enabled]} object]
(cond
(nil? slack-token) (metabot/stop-metabot!)
(not metabot-enabled) (metabot/stop-metabot!)
(nil? slack-token) (metabot/stop-metabot!)
(not metabot-enabled) (metabot/stop-metabot!)
:else (metabot/restart-metabot!))))
; (let [{:keys [slack-token metabot-enabled]} object]
; (cond
Expand Down
7 changes: 3 additions & 4 deletions src/metabase/metabot.clj
Original file line number Diff line number Diff line change
Expand Up @@ -318,12 +318,11 @@
(reset! websocket-monitor-thread-id nil)
(disconnect-websocket!))

(defn restart-metabot!
"Restart the Metaot.
(defn restart-metabot!
"Restart the Metabot listening process.
Used on settings changed"
[]
(when @websocket-monitor-thread-id
(log/info "Metabot already running. Killing the previous WebSocket listener first.")
(stop-metabot!))
(start-metabot!)
)
(start-metabot!))

0 comments on commit 59dfe81

Please sign in to comment.