splitting out background tasks

This commit is contained in:
2022-09-18 06:51:17 -07:00
parent 8b271e9e2a
commit 5017d9bc67
6 changed files with 287 additions and 244 deletions

View File

@@ -16,6 +16,8 @@
[auto-ap.background.metrics :as metrics]
[auto-ap.background.mail :as mail]
[auto-ap.jobs.square :as job-square]
[auto-ap.jobs.ledger-reconcile :as job-reconcile-ledger]
[auto-ap.jobs.current-balance-cache :as job-current-balance-cache]
[clojure.tools.logging :as log]
[config.core :refer [env]]
[mount.core :as mount]
@@ -91,6 +93,13 @@
(cond (= job "square-import-job")
(job-square/-main)
(= job "reconcile-ledger")
(job-reconcile-ledger/-main)
(= job "current-balance-cache")
(job-current-balance-cache/-main)
(= job "hello-world")
(do
(log/info "HELLO WORLD")
@@ -104,14 +113,11 @@
(not (env :run-web? )) (into [#'jetty
#'jetty-stats])
(not (env :run-background?)) (into [#'vendor/refresh-vendor-usages-worker
#'ledger/touch-broken-ledger-worker
#'mail/import-invoices
#'ledger/process-txes-worker
#'ledger/ledger-reconciliation-worker
#'requests/request-listener
#'sysco/sysco-invoice-importer
#'auto-ap.background.invoices/close-auto-invoices-worker
#'gq-clients/current-balance-worker
#'yodlee2/import-worker
#'yodlee2/account-worker
#'intuit/import-worker