Makes integreat run on datomic cloud
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
#_{:clj-kondo/ignore [:unused-namespace]}
|
||||
[yang.scheduler :as scheduler]
|
||||
[clj-time.coerce :as coerce]
|
||||
[datomic.api :as d]
|
||||
[datomic.client.api :as dc]
|
||||
[auto-ap.datomic :refer [conn]]
|
||||
[auto-ap.datomic.clients :as d-clients]))
|
||||
;; switch all of this to use tokens instead of passing around client codes, particularly because the codes
|
||||
@@ -293,7 +293,7 @@
|
||||
:body
|
||||
:providerAccount
|
||||
first))
|
||||
@(d/transact conn [[:db/retractEntity (:db/id (d/entity (d/db conn) [:yodlee-provider-account/id id]))]]))
|
||||
(dc/transact conn {:tx-data [[:db/retractEntity [:yodlee-provider-account/id id]]]}))
|
||||
|
||||
(defn upsert-accounts-tx
|
||||
([client-code]
|
||||
@@ -322,8 +322,8 @@
|
||||
|
||||
(defn refresh-provider-account [client-code id]
|
||||
(log/info "refreshing yodlee provider account id" id)
|
||||
@(d/transact conn (upsert-accounts-tx client-code
|
||||
[(get-provider-account client-code id)])))
|
||||
(dc/transact conn {:tx-data (upsert-accounts-tx client-code
|
||||
[(get-provider-account client-code id)])}))
|
||||
|
||||
(defn upsert-accounts []
|
||||
(let [concurrent 20
|
||||
@@ -341,7 +341,7 @@
|
||||
(async/to-chan! (d-clients/get-all)))
|
||||
(let [result (async/<!! (async/into [] output-chan))]
|
||||
(log/info "Current yodlee state is " result)
|
||||
@(d/transact conn result))))
|
||||
(dc/transact conn {:tx-data result}))))
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user