service check implementation
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
(ns auto-ap.utils
|
||||
#?@
|
||||
(:clj
|
||||
[(:require [clojure.tools.logging :as log])]))
|
||||
[(:require [com.unbounce.dogstatsd.core :as statsd])]))
|
||||
|
||||
(defn by
|
||||
([f xs]
|
||||
@@ -86,10 +86,10 @@
|
||||
|
||||
(defn heartbeat [f id]
|
||||
(fn []
|
||||
#?(:clj
|
||||
(do
|
||||
(log/info "Heartbeat for " id)
|
||||
(f))
|
||||
|
||||
#?(:clj (do
|
||||
(f)
|
||||
(statsd/service-check {:name (str id)
|
||||
:status :ok}
|
||||
nil))
|
||||
:cljs (do (println "Heartbeat for " id)
|
||||
(f)))))
|
||||
|
||||
Reference in New Issue
Block a user