scrubbed all reference to datomic.api

This commit is contained in:
2023-03-20 12:54:56 -07:00
parent 8290138156
commit 9260834135
19 changed files with 731 additions and 611 deletions

View File

@@ -280,14 +280,20 @@
(finish! [this])
(fail! [this error]))
(def bank-account-pull [:bank-account/code
:db/id
:bank-account/locations
:bank-account/start-date
{:client/_bank-accounts [:client/code :client/locked-until :client/locations :db/id]} ])
(defn start-import-batch [source user]
(let [stats (atom {:import-batch/imported 0
(let [stats (atom {:import-batch/imported 0
:import-batch/suppressed 0
:import-batch/error 0
:import-batch/not-ready 0
:import-batch/extant 0})
extant-cache (atom (cache/ttl-cache-factory {} :ttl 60000 ))
import-id (get (:tempids (dc/transact conn {:tx-data [{:db/id "import-batch"
extant-cache (atom (cache/ttl-cache-factory {} :ttl 60000 ))
import-id (get (:tempids (dc/transact conn {:tx-data [{:db/id "import-batch"
:import-batch/date (coerce/to-date (t/now))
:import-batch/source source
:import-batch/status :import-status/started
@@ -298,11 +304,7 @@
(reify ImportBatch
(import-transaction! [_ transaction]
(let [bank-account (dc/pull (dc/db conn)
[:bank-account/code
:db/id
:bank-account/locations
:bank-account/start-date
{:client/_bank-accounts [:client/code :client/locked-until :client/locations :db/id]} ]
bank-account-pull
(:transaction/bank-account transaction))
extant (get (swap! extant-cache cache/through-cache (:transaction/bank-account transaction) get-existing)
(:transaction/bank-account transaction))