service check implementation
This commit is contained in:
@@ -423,5 +423,5 @@
|
||||
(log/error e)))))
|
||||
|
||||
(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))
|
||||
|
||||
@@ -502,7 +502,7 @@
|
||||
(upsert-refunds client))))
|
||||
|
||||
(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))
|
||||
|
||||
|
||||
|
||||
@@ -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