working on support gl.

This commit is contained in:
Bryce Covert
2019-12-31 18:00:58 -08:00
parent 4b2821e6fb
commit 475985c137
2 changed files with 7 additions and 5 deletions

View File

@@ -6,11 +6,11 @@
[auto-ap.ledger :as ledger]))
(defn test-run [txs-set]
(println "processing " (count txs-set))
#_(println "processing " (count txs-set))
(doseq [[i tx] (map vector (range) txs-set)]
@(d/transact (d/connect auto-ap.datomic/uri)
tx)
(when (= 0 (mod i 1000))
(when (= 0 (mod i 100))
(println "processed " i))))
@@ -218,7 +218,6 @@
:in '[$]
:where ['[?e :transaction/id]]}
:args [(d/db conn)]}))
_ (println (count transaction-ids))
z (->> transaction-ids
(map #(ledger/entity-change->ledger (d/db conn) [:transaction %]))
(filter identity)
@@ -438,7 +437,7 @@
:in '[$]
:where ['[?e :journal-entry/original-entity ]]}
:args [(d/db conn)]})
(mapv (fn [[id]]
(map (fn [[id]]
[:db/retractEntity id]))
(partition-all 100))]
results))

View File

@@ -141,8 +141,11 @@
#_(println "updating general-ledger " d-tx)
@(d/transact (d/connect uri) [d-tx]))))
(def break (atom false))
(defn process-all []
(while (not (Thread/interrupted))
(while (and (not @break)
(not (Thread/interrupted)))
(process-one (d/tx-report-queue (d/connect uri) ))))