Added check printing test

This commit is contained in:
2023-03-25 15:27:43 -07:00
parent 8508fbe70c
commit 5e9f480790
3 changed files with 315 additions and 80 deletions

View File

@@ -4,7 +4,8 @@
[clojure.tools.logging :as log]
[config.core :refer [env]]
[datomic.api :as d]
[mount.core :as mount]))
[mount.core :as mount]
[com.brunobonacci.mulog :as mu]))
(def uri (:datomic-url env))
@@ -639,5 +640,13 @@
(partition-all 50 txes))))
(defn audit-transact [txes id]
@(d/transact conn (conj txes {:db/id "datomic.tx"
:audit/user (str (:user/role id) "-" (:user/name id))})))
(try
@(d/transact conn (conj txes {:db/id "datomic.tx"
:audit/user (str (:user/role id) "-" (:user/name id))}))
(catch Exception e
(mu/log ::transaction-error
:exception e
:level :error
:tx txes)
(throw e)
)))