Does not use timeouts for background processing

This commit is contained in:
Bryce
2023-05-23 12:40:33 -07:00
parent 613d62b60d
commit 8cb8a92a2f
3 changed files with 28 additions and 29 deletions

View File

@@ -407,7 +407,7 @@
(daily-results client location start end))]
(doseq [x (partition-all 20 to-create)]
(log/info "Loading " (count x))
@(dc/transact conn x))))))
@(dc/transact-async conn x))))))
(defn upsert-settlements
([client]
@@ -419,7 +419,7 @@
:client (:client/code client)}
(doseq [x (partition-all 20 (daily-settlements client location))]
(log/info "Loading expected deposit" (count x))
@(dc/transact conn x))
@(dc/transact-async conn x))
(log/info "Done loading settlements"))))
(defn upsert-refunds
@@ -433,7 +433,7 @@
:location (:square-location/client-location client)}
(doseq [x (partition-all 20 (refunds client location))]
(log/info "Loading refund" (count x))
@(dc/transact conn x))
@(dc/transact-async conn x))
(log/info "Done loading refunds"))))
(def square-read [:db/id
@@ -474,7 +474,7 @@
[(:square-location/square-id sl)
(:db/id sl)])
(:client/square-locations client)))]
@(dc/transact conn (for [square-location (client-locations client)]
@(dc/transact-async conn (for [square-location (client-locations client)]
{:db/id (or (square-id->id (:id square-location)) (random-tempid))
:client/_square-locations (:db/id client)
:square-location/name (:name square-location)
@@ -492,7 +492,7 @@
(map (fn [x] [:db/retractEntity x]))))
(defn mark-integration-status [client integration-status]
@(dc/transact conn
@(dc/transact-async conn
[{:db/id (:db/id client)
:client/square-integration-status (assoc integration-status
:db/id (or (-> client :client/square-integration-status :db/id)