makes it easy for bryce to trigger reload for all yodlee

This commit is contained in:
Bryce
2023-07-28 13:59:15 -07:00
parent 9c6c5d8f9e
commit bc57978ceb
3 changed files with 26 additions and 8 deletions

View File

@@ -645,7 +645,7 @@
_ (mu/log ::transacting-batch
:batch batch-id
:count (count batch))
tx-result @(dc/transact conn batch)]
tx-result @(dc/transact-async conn batch)]
(cond-> full-tx
(:tx-data full-tx) (update :tx-data #(into % (:tx-data tx-result)))

View File

@@ -359,3 +359,18 @@
(defn reauthenticate-and-recache [client-code pa data]
(reauthenticate client-code pa data)
(refresh-provider-account client-code pa))
(defn force-pull-all []
(doseq [[client-code yodlee-provider-account] (seq (dc/q '[:find ?cd ?pai
:where [?c :client/code ?cd]
[?yap :yodlee-provider-account/client ?c]
[?yap :yodlee-provider-account/id ?pai]]
(dc/db conn)))]
(println "Trying " client-code "account" yodlee-provider-account)
(clojure.pprint/pprint (reauthenticate client-code yodlee-provider-account {}))
(println "waiting")
(Thread/sleep 15000)
(println "refreshing")
(clojure.pprint/pprint (refresh-provider-account client-code yodlee-provider-account))))