diff --git a/backend/src/app/loggers/audit.clj b/backend/src/app/loggers/audit.clj index 629da4824..fa4f67721 100644 --- a/backend/src/app/loggers/audit.clj +++ b/backend/src/app/loggers/audit.clj @@ -254,9 +254,9 @@ "Submit audit event to the collector." [{:keys [::wrk/executor ::db/pool]} params] (->> (px/submit! executor (partial persist-event! pool (d/without-nils params))) - (p/err (fn [cause] - (l/error :hint "audit: unexpected error processing event" :cause cause) - (p/resolved nil))))) + (p/merr (fn [cause] + (l/error :hint "audit: unexpected error processing event" :cause cause) + (p/resolved nil))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; TASK: ARCHIVE diff --git a/backend/src/app/redis.clj b/backend/src/app/redis.clj index dcf9b7ea2..0ada4b0b9 100644 --- a/backend/src/app/redis.clj +++ b/backend/src/app/redis.clj @@ -360,18 +360,18 @@ ^ScriptOutputType ScriptOutputType/MULTI ^"[Ljava.lang.String;" keys ^"[Ljava.lang.String;" vals) - (p/map (fn [result] - (let [elapsed (tpoint)] - (mtx/run! metrics {:id :redis-eval-timing - :labels [(name sname)] - :val (inst-ms elapsed)}) - (l/trace :hint "eval script" - :name (name sname) - :sha sha - :params (str/join "," (::rscript/vals script)) - :elapsed (dt/format-duration elapsed)) - result))) - (p/error on-error)))) + (p/fmap (fn [result] + (let [elapsed (tpoint)] + (mtx/run! metrics {:id :redis-eval-timing + :labels [(name sname)] + :val (inst-ms elapsed)}) + (l/trace :hint "eval script" + :name (name sname) + :sha sha + :params (str/join "," (::rscript/vals script)) + :elapsed (dt/format-duration elapsed)) + result))) + (p/merr on-error)))) (read-script [] (-> script ::rscript/path io/resource slurp)) diff --git a/backend/src/app/rpc/climit.clj b/backend/src/app/rpc/climit.clj index 8b97c4cce..8ccf07300 100644 --- a/backend/src/app/rpc/climit.clj +++ b/backend/src/app/rpc/climit.clj @@ -39,22 +39,21 @@ (defn invoke! [limiter f] - (p/handle - (px/submit! limiter f) - (fn [result cause] - (cond - (capacity-exception? cause) - (p/rejected - (ex/error :type :internal - :code :concurrency-limit-reached - :queue (-> limiter meta :bkey name) - :cause cause)) + (->> (px/submit! limiter f) + (p/hcat (fn [result cause] + (cond + (capacity-exception? cause) + (p/rejected + (ex/error :type :internal + :code :concurrency-limit-reached + :queue (-> limiter meta :bkey name) + :cause cause)) - (some? cause) - (p/rejected cause) + (some? cause) + (p/rejected cause) - :else - (p/resolved result))))) + :else + (p/resolved result)))))) (defn- create-limiter [{:keys [executor metrics concurrency queue-size bkey skey]}] diff --git a/common/deps.edn b/common/deps.edn index 435fffa59..6e6c6929d 100644 --- a/common/deps.edn +++ b/common/deps.edn @@ -23,7 +23,7 @@ com.cognitect/transit-cljs {:mvn/version "0.8.280"} java-http-clj/java-http-clj {:mvn/version "0.4.3"} - funcool/promesa {:mvn/version "9.2.542"} + funcool/promesa {:mvn/version "10.0.570"} funcool/cuerdas {:mvn/version "2022.06.16-403"} lambdaisland/uri {:mvn/version "1.13.95"