turning everything on.

This commit is contained in:
Bryce Covert
2021-12-23 07:31:08 -08:00
parent 67cd9c909b
commit cb1bac4e07
4 changed files with 12 additions and 12 deletions

View File

@@ -20,7 +20,10 @@
(let [[{:keys [message-id receipt-handle body]}] (:messages (sqs/receive-message {:queue-url queue-url (let [[{:keys [message-id receipt-handle body]}] (:messages (sqs/receive-message {:queue-url queue-url
:wait-time-seconds 1 :wait-time-seconds 1
:count 1}))] :count 1}))]
(when message-id (when message-id
(sqs/delete-message {:queue-url queue-url
:receipt-handle receipt-handle} )
(log/infof "processing message %s with body %s" message-id body ) (log/infof "processing message %s with body %s" message-id body )
(cond (cond
(= ":intuit" body) (= ":intuit" body)
@@ -46,8 +49,7 @@
(p/import-plaid) (p/import-plaid)
(catch Exception e (catch Exception e
(log/error e)))) (log/error e))))
(sqs/delete-message {:queue-url queue-url ))))
:receipt-handle receipt-handle} )))))
(defn fake-message [] (defn fake-message []
(sqs/send-message {:queue-url (:requests-queue-url env) (sqs/send-message {:queue-url (:requests-queue-url env)

View File

@@ -186,7 +186,7 @@
:error :error
(not= "POSTED" (:transaction/status transaction)) (not= "POSTED" (:transaction/status transaction))
:not-posted :not-ready
(and (:bank-account/start-date bank-account) (and (:bank-account/start-date bank-account)
(not (t/after? (coerce/to-date-time (:transaction/date transaction)) (not (t/after? (coerce/to-date-time (:transaction/date transaction))

View File

@@ -66,5 +66,5 @@
(mount/defstate import-worker (mount/defstate import-worker
:start (scheduler/every (* 1000 60 60 4) import-yodlee) :start (scheduler/every (* 1000 60 60 8) import-yodlee)
:stop (scheduler/stop import-worker)) :stop (scheduler/stop import-worker))

View File

@@ -45,8 +45,12 @@
#'sysco/sysco-invoice-importer #'sysco/sysco-invoice-importer
#'auto-ap.background.invoices/close-auto-invoices-worker #'auto-ap.background.invoices/close-auto-invoices-worker
#'gq-clients/current-balance-worker #'gq-clients/current-balance-worker
#'yodlee/import-worker
#'yodlee2/import-worker
#'yodlee2/account-worker
#'intuit/import-worker
#'intuit/account-worker
#'plaid/import-worker
#'migrate/migrate-start]))] #'migrate/migrate-start]))]
(log/info "starting without " without) (log/info "starting without " without)
@@ -55,10 +59,4 @@
(apply mount/start-without without))) (apply mount/start-without without)))
(comment (comment
#'yodlee/import-worker
#'yodlee2/import-worker
#'yodlee2/account-worker
#'intuit/import-worker
#'intuit/account-worker
#'plaid/import-worker
) )