Heartbeats scheduled things so that I can do health on them

This commit is contained in:
2022-06-21 15:48:50 -07:00
parent 47d5c3911a
commit 183ebf9da5
4 changed files with 24 additions and 5 deletions

View File

@@ -1,4 +1,7 @@
(ns auto-ap.utils)
(ns auto-ap.utils
#?@
(:clj
[(:require [clojure.tools.logging :as log])]))
(defn by
([f xs]
@@ -79,3 +82,14 @@
(f)
(finally
(reset! in-progress? false)))))))
(defn heartbeat [f id]
(fn []
#?(:clj
(do
(log/info "Heartbeat for " id)
(f))
:cljs (do (println "Heartbeat for " id)
(f)))))