splitting out background tasks
This commit is contained in:
@@ -222,12 +222,6 @@
|
||||
(log/warn "repairing " (count txes-missing-ledger-entries) " missing transactions, " (count invoices-missing-ledger-entries) " missing invoices that were missing ledger entries")
|
||||
@(d/transact conn repairs)))))
|
||||
|
||||
(mount/defstate reconciliation-frequency :start (* 1000 60 60))
|
||||
|
||||
(mount/defstate ledger-reconciliation-worker
|
||||
:start (scheduler/every reconciliation-frequency (heartbeat reconcile-ledger "reconcile-ledger"))
|
||||
:stop (scheduler/stop ledger-reconciliation-worker))
|
||||
|
||||
|
||||
(defn touch-transaction [e]
|
||||
@(d/transact conn [[:db/retractEntity [:journal-entry/original-entity e]]])
|
||||
@@ -465,7 +459,3 @@
|
||||
:text "This process looks for unbalance ledger entries, or missing ledger entries"
|
||||
:priority :low}
|
||||
nil))
|
||||
|
||||
(mount/defstate touch-broken-ledger-worker
|
||||
:start (scheduler/every reconciliation-frequency (heartbeat touch-broken-ledger "touch-broken-ledger"))
|
||||
:stop (scheduler/stop touch-broken-ledger-worker))
|
||||
|
||||
Reference in New Issue
Block a user