Fixes yodlee issue
This commit is contained in:
@@ -51,7 +51,7 @@
|
|||||||
(alog/info ::starting-yodlee-import)
|
(alog/info ::starting-yodlee-import)
|
||||||
(let [import-batch (t/start-import-batch :import-source/yodlee2 "Automated yodlee2 user")]
|
(let [import-batch (t/start-import-batch :import-source/yodlee2 "Automated yodlee2 user")]
|
||||||
(try
|
(try
|
||||||
(let [account-lookup (dc/q '[:find ?ya ?ba ?cd ?ud
|
(let [account-lookup (dc/q '[:find ?ya ?ba ?cd ?ud ?y
|
||||||
:in $
|
:in $
|
||||||
:where
|
:where
|
||||||
[?ba :bank-account/yodlee-account ?y]
|
[?ba :bank-account/yodlee-account ?y]
|
||||||
@@ -72,10 +72,10 @@
|
|||||||
|
|
||||||
(alog/info ::finished-import)
|
(alog/info ::finished-import)
|
||||||
(t/finish! import-batch)
|
(t/finish! import-batch)
|
||||||
(doseq [[yodlee-account bank-account] account-lookup]
|
(doseq [[_ bank-account _ _ ya] account-lookup]
|
||||||
(try
|
(try
|
||||||
@(dc/transact auto-ap.datomic/conn
|
@(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)}])
|
:yodlee-account/pending-balance (t/get-pending-balance import-batch bank-account)}])
|
||||||
(catch Exception e
|
(catch Exception e
|
||||||
(alog/error ::cant-persist-yodlee-account-pending-balance
|
(alog/error ::cant-persist-yodlee-account-pending-balance
|
||||||
@@ -96,5 +96,4 @@
|
|||||||
(Thread/sleep 10000)))))
|
(Thread/sleep 10000)))))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(def import-yodlee2 (allow-once import-yodlee2-int))
|
(def import-yodlee2 (allow-once import-yodlee2-int))
|
||||||
|
|||||||
Reference in New Issue
Block a user