New form of square loading.

This commit is contained in:
2022-09-16 14:23:38 -07:00
parent f6758a850d
commit 98f21bf3df
6 changed files with 237 additions and 91 deletions

View File

@@ -8,7 +8,7 @@
[unilog.context :as lc]))
(defn -main [& _]
(lc/with-context {:background-job "square-loading"}
(lc/with-context {:background-job "square-loading-new"}
(mount/start (mount/only #{#'conn}))
((heartbeat square/upsert-all "square-loading"))
(mount/stop (mount/only #{#'conn}))

View File

@@ -103,8 +103,7 @@
(let [without (cond-> []
(not (env :run-web? )) (into [#'jetty
#'jetty-stats])
(not (env :run-background?)) (into [#'square/square-loader
#'vendor/refresh-vendor-usages-worker
(not (env :run-background?)) (into [#'vendor/refresh-vendor-usages-worker
#'ledger/touch-broken-ledger-worker
#'mail/import-invoices
#'ledger/process-txes-worker

View File

@@ -530,7 +530,7 @@
(some-> (:object &throw-context) str)
"Unknown error")}))))))
(mount/defstate square-loader
#_(mount/defstate square-loader
:start (scheduler/every (* 4 59 60 1000) (heartbeat upsert-all "square-loading"))
:stop (scheduler/stop square-loader))