mirror of
https://github.com/penpot/penpot.git
synced 2025-06-22 11:26:59 +02:00
⬆️ Update promesa library
This commit is contained in:
parent
36b162b4fa
commit
d8daea72de
2 changed files with 10 additions and 8 deletions
|
@ -22,7 +22,8 @@
|
|||
[datoteka.fs :as fs]
|
||||
[integrant.core :as ig]
|
||||
[promesa.exec :as px]
|
||||
[promesa.exec.bulkhead :as pbh])
|
||||
[promesa.exec.bulkhead :as pbh]
|
||||
[promesa.protocols :as pt])
|
||||
(:import
|
||||
clojure.lang.ExceptionInfo
|
||||
java.util.concurrent.atomic.AtomicLong))
|
||||
|
@ -178,12 +179,13 @@
|
|||
(measure metrics mlabels stats nil)
|
||||
(log "enqueued" req-id stats limit-id limit-label limit-params nil))
|
||||
|
||||
(px/invoke! limiter (fn []
|
||||
(let [elapsed (tpoint)
|
||||
stats (pbh/get-stats limiter)]
|
||||
(measure metrics mlabels stats elapsed)
|
||||
(log "acquired" req-id stats limit-id limit-label limit-params elapsed)
|
||||
(handler))))
|
||||
;; WORKAROUND: this is a temporal change until the bug is fixed in funcool/promesa
|
||||
@(pt/-submit! limiter (fn []
|
||||
(let [elapsed (tpoint)
|
||||
stats (pbh/get-stats limiter)]
|
||||
(measure metrics mlabels stats elapsed)
|
||||
(log "acquired" req-id stats limit-id limit-label limit-params elapsed)
|
||||
(handler))))
|
||||
|
||||
(catch ExceptionInfo cause
|
||||
(let [{:keys [type code]} (ex-data cause)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue