This commit is contained in:
Bryce Covert
2020-04-27 09:30:30 -07:00
parent b89b4a86c5
commit 25f1cebe51
9 changed files with 196 additions and 127 deletions

View File

@@ -30,6 +30,11 @@
:where ['[?e :journal-entry/client ?client-id]]}
:args [(:client-id args)]})
(:vendor-id args)
(merge-query {:query {:in ['?vendor-id]
:where ['[?e :journal-entry/vendor ?vendor-id]]}
:args [(:vendor-id args)]})
(:client-code args)
(merge-query {:query {:in ['?client-code]
:where ['[?e :journal-entry/client ?client-id]

View File

@@ -436,6 +436,7 @@
:ledger_page {:type :ledger_page
:args {:client_id {:type :id}
:vendor_id {:type :id}
:bank_account_id {:type :id}
:from_date {:type :iso_date}
:to_date {:type :iso_date}
@@ -786,7 +787,6 @@
->graphql
(first (d-checks/get-graphql (assoc (<-graphql args) :count Integer/MAX_VALUE)))))
(defn get-user [context args value]
(assert-admin (:id context))

View File

@@ -116,7 +116,7 @@
(defn process-one [report-queue]
(let [transaction (.take report-queue)
_ (println "processing transaction" transaction)
_ (println "processing transaction")
db (:db-after transaction)
affected-entities (->> (:tx-data transaction)
(map (fn [^datomic.db.Datum x]
@@ -144,6 +144,7 @@
(def break (atom false))
(defn process-all []
(println "Starting worker")
(while (and (not @break)
(not (Thread/interrupted)))
(process-one (d/tx-report-queue (d/connect uri) ))))