Makes new square loading much faster, parallel.

This commit is contained in:
2023-01-08 08:27:48 -08:00
parent ff48e1fab4
commit 553330297a
4 changed files with 58 additions and 55 deletions

View File

@@ -10,7 +10,8 @@
(defn execute [name f]
(try
(lc/with-context {:background-job name}
(mu/with-context {:background-job name}
(mu/with-context {:background-job name
:service name}
(mount/start (mount/only #{#'conn #'metrics-setup #'container-tags #'logging-context #'container-data}))
((heartbeat f name))
(log/info "Stopping " name)

View File

@@ -2,8 +2,8 @@
(:gen-class)
(:require
[auto-ap.jobs.core :refer [execute]]
[auto-ap.square.core2 :as square2]))
[auto-ap.square.core3 :as square3]))
(defn -main [& _]
(execute "square2-loading" square2/upsert-all))
(execute "square3-loading" square3/do-upsert-all))