service check implementation
This commit is contained in:
@@ -423,5 +423,5 @@
|
|||||||
(log/error e)))))
|
(log/error e)))))
|
||||||
|
|
||||||
(mount/defstate touch-broken-ledger-worker
|
(mount/defstate touch-broken-ledger-worker
|
||||||
:start (scheduler/every reconciliation-frequency (heartbeat touch-broken-ledger :touch-broken-ledger))
|
:start (scheduler/every reconciliation-frequency (heartbeat touch-broken-ledger "touch-broken-ledger"))
|
||||||
:stop (scheduler/stop touch-broken-ledger-worker))
|
:stop (scheduler/stop touch-broken-ledger-worker))
|
||||||
|
|||||||
@@ -502,7 +502,7 @@
|
|||||||
(upsert-refunds client))))
|
(upsert-refunds client))))
|
||||||
|
|
||||||
(mount/defstate square-loader
|
(mount/defstate square-loader
|
||||||
:start (scheduler/every (* 4 59 60 1000) (heartbeat upsert-all :square-loading))
|
:start (scheduler/every (* 4 59 60 1000) (heartbeat upsert-all "square-loading"))
|
||||||
:stop (scheduler/stop square-loader))
|
:stop (scheduler/stop square-loader))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
(ns auto-ap.utils
|
(ns auto-ap.utils
|
||||||
#?@
|
#?@
|
||||||
(:clj
|
(:clj
|
||||||
[(:require [clojure.tools.logging :as log])]))
|
[(:require [com.unbounce.dogstatsd.core :as statsd])]))
|
||||||
|
|
||||||
(defn by
|
(defn by
|
||||||
([f xs]
|
([f xs]
|
||||||
@@ -86,10 +86,10 @@
|
|||||||
|
|
||||||
(defn heartbeat [f id]
|
(defn heartbeat [f id]
|
||||||
(fn []
|
(fn []
|
||||||
#?(:clj
|
#?(:clj (do
|
||||||
(do
|
(f)
|
||||||
(log/info "Heartbeat for " id)
|
(statsd/service-check {:name (str id)
|
||||||
(f))
|
:status :ok}
|
||||||
|
nil))
|
||||||
:cljs (do (println "Heartbeat for " id)
|
:cljs (do (println "Heartbeat for " id)
|
||||||
(f)))))
|
(f)))))
|
||||||
|
|||||||
Reference in New Issue
Block a user