Added check printing test
This commit is contained in:
@@ -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)
|
||||
)))
|
||||
|
||||
Reference in New Issue
Block a user