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,5 +1,6 @@
(ns auto-ap.square.core
(:require [auto-ap.datomic :refer [conn remove-nils]]
[auto-ap.utils :refer [heartbeat]]
[auto-ap.time :as atime]
[clj-http.client :as client]
[clj-time.coerce :as coerce]
@@ -501,7 +502,7 @@
(upsert-refunds client))))
(mount/defstate square-loader
:start (scheduler/every (* 4 59 60 1000) upsert-all)
:start (scheduler/every (* 4 59 60 1000) (heartbeat upsert-all :square-loading))
:stop (scheduler/stop square-loader))