From c320cbc47b1f5c9a546afee7bafb91962405f842 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 5 Aug 2025 19:17:35 +0200 Subject: [PATCH] :bug: Revert to semaphore based climit impl --- backend/src/app/rpc/climit.clj | 14 +++++++------- common/deps.edn | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/backend/src/app/rpc/climit.clj b/backend/src/app/rpc/climit.clj index 34080e8e25..3e673a15ec 100644 --- a/backend/src/app/rpc/climit.clj +++ b/backend/src/app/rpc/climit.clj @@ -100,7 +100,7 @@ (pbh/create :permits (or (:permits config) (:concurrency config)) :queue (or (:queue config) (:queue-size config)) :timeout (:timeout config) - :executor :virtual)) + :type :semaphore)) (defn- create-cache [{:keys [::wrk/executor]}] @@ -178,12 +178,12 @@ (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)))) + (pbh/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)))) (catch ExceptionInfo cause (let [{:keys [type code]} (ex-data cause)] diff --git a/common/deps.edn b/common/deps.edn index f6e54ae876..1bdddf690c 100644 --- a/common/deps.edn +++ b/common/deps.edn @@ -30,7 +30,7 @@ funcool/tubax {:mvn/version "2021.05.20-0"} funcool/cuerdas {:mvn/version "2025.06.16-414"} funcool/promesa - {:git/sha "f52f58cfacf62f59eab717e2637f37729d0cc383" + {:git/sha "46048fc0d4bf5466a2a4121f5d52aefa6337f2e8" :git/url "https://github.com/funcool/promesa"} funcool/datoteka