Fixes yodlee issue

This commit is contained in:
2024-09-26 07:25:24 -07:00
parent fea344658b
commit b7d976cf19

View File

@@ -51,7 +51,7 @@
(alog/info ::starting-yodlee-import)
(let [import-batch (t/start-import-batch :import-source/yodlee2 "Automated yodlee2 user")]
(try
(let [account-lookup (dc/q '[:find ?ya ?ba ?cd ?ud
(let [account-lookup (dc/q '[:find ?ya ?ba ?cd ?ud ?y
:in $
:where
[?ba :bank-account/yodlee-account ?y]
@@ -72,10 +72,10 @@
(alog/info ::finished-import)
(t/finish! import-batch)
(doseq [[yodlee-account bank-account] account-lookup]
(doseq [[_ bank-account _ _ ya] account-lookup]
(try
@(dc/transact auto-ap.datomic/conn
[{:db/id yodlee-account
[{:db/id ya
:yodlee-account/pending-balance (t/get-pending-balance import-batch bank-account)}])
(catch Exception e
(alog/error ::cant-persist-yodlee-account-pending-balance
@@ -96,5 +96,4 @@
(Thread/sleep 10000)))))
(def import-yodlee2 (allow-once import-yodlee2-int))