Makes running datomic cloud work again

This commit is contained in:
2023-03-17 12:56:39 -07:00
parent aebf95a87b
commit f7fe2b2bee
12 changed files with 102 additions and 105 deletions

View File

@@ -283,7 +283,7 @@
(iterate #(time/plus % (time/days -1)))
(filter #(= 7 (time/day-of-week %)))))
(time/days 1)))
orders-to-update (doall (for [[order uuid] (d/q '[:find ?eid ?uuid
orders-to-update (doall (for [[order uuid] (dc/q '[:find ?eid ?uuid
:in $ ?start
:where [?e :sales-order/vendor :vendor/ccp-ezcater]
[?e :sales-order/date ?d]
@@ -293,7 +293,7 @@
[?c :client/ezcater-locations ?l]
[?l :ezcater-location/caterer ?c2]
[?c2 :ezcater-caterer/uuid ?uuid]]
(d/db conn)
(dc/db conn)
last-sunday)
:let [_ (alog/info ::considering
:order order)
@@ -307,7 +307,7 @@
"key" "accepted",
"occurred_at" "2022-07-21T19:21:07.549Z"}
ezcater-order (lookup-order lookup-map)
extant-order (d/pull (d/db conn) '[:sales-order/total
extant-order (dc/pull (dc/db conn) '[:sales-order/total
:sales-order/tax
:sales-order/tip
:sales-order/discount
@@ -346,6 +346,6 @@
updated-order))]
(alog/info :found-orders-to-update
:orders orders-to-update)
@(dc/transact conn {:tx-data orders-to-update})))
(dc/transact conn {:tx-data orders-to-update})))