a variety of bug fixes.

This commit is contained in:
2023-09-29 09:05:17 -07:00
parent 829c857122
commit f8b76b6c2c
6 changed files with 28 additions and 41 deletions

View File

@@ -20,7 +20,6 @@
[auto-ap.graphql.utils :refer [assert-admin attach-tracing-resolvers]]
[auto-ap.graphql.vendors :as gq-vendors]
[auto-ap.graphql.yodlee-merchants :as ym]
[auto-ap.graphql.yodlee2 :as gq-yodlee2]
[auto-ap.logging :as alog :refer [error-event info-event warn-event]]
[auto-ap.time :as time]
[clj-time.coerce :as coerce]
@@ -352,9 +351,7 @@
:cash_flow {:type :cash_flow_result
:args {:client_id {:type :id}}
:resolve :get-cash-flow}
:yodlee_provider_account_page {:type :yodlee_provider_account_page
:args {:client_id {:type :id}}
:resolve :get-yodlee-provider-account-page}
:account_page {:type :account_page
:args {:name_like {:type 'String}
@@ -794,7 +791,6 @@
(-> integreat-schema
(attach-tracing-resolvers
{
:get-yodlee-provider-account-page gq-yodlee2/get-yodlee-provider-account-page
:get-accounts gq-accounts/get-graphql
:get-all-accounts gq-accounts/get-all-graphql
:get-transaction-rule-page gq-transaction-rules/get-transaction-rule-page

View File

@@ -1,14 +0,0 @@
(ns auto-ap.graphql.yodlee2
(:require
[auto-ap.datomic.yodlee2 :as d-yodlee2]
[auto-ap.graphql.utils :refer [->graphql <-graphql]]))
(defn get-yodlee-provider-account-page [context args _]
(let [args (assoc args :id (:id context))
[yodlee-provider-accounts cnt] (d-yodlee2/get-graphql (<-graphql (assoc args :clients (:clients context))))]
{:yodlee_provider_accounts (map ->graphql yodlee-provider-accounts)
:total cnt
:count (count yodlee-provider-accounts)
:start (:start args 0)
:end (+ (:start args 0) (count yodlee-provider-accounts))}))

View File

@@ -34,7 +34,7 @@
(def manifold-api-stream
(let [stream (s/stream 100)]
(->> stream
(s/throttle 80)
(s/throttle 50)
(s/map (fn [[request attempt response-deferred]]
(de/catch
(de/chain
@@ -47,8 +47,8 @@
:background-job "Square 3")
(try
(client/request (assoc request
:socket-timeout 5000
:connection-timeout 5000
:socket-timeout 10000
:connection-timeout 10000
#_#_:connection-request-timeout 5000
:as :json))
(catch Throwable e
@@ -60,7 +60,7 @@
(if (>= attempt 5)
(throw e)
(de/chain
(mt/in 1000 (fn [] 1))
(mt/in 10000 (fn [] 1))
(fn [_] (de/recur (inc attempt)))))))
(de/chain identity)))
(fn [result]
@@ -383,7 +383,7 @@
(daily-results client location (time/plus (time/now) (time/days -7)) (time/now)))
([client location start end]
(capture-context->lc
(->
(->
(de/chain (search client location start end)
(fn [search-results]
(->> (or search-results [])