From 0c30d53d9586ffeacc265413335e4828cee416fc Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Fri, 8 Jan 2021 12:37:32 +0100 Subject: [PATCH] :bug: Fix wrong conn handling on some function on storage. --- backend/src/app/storage.clj | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/src/app/storage.clj b/backend/src/app/storage.clj index f2fc8f3419..6dcd2bb291 100644 --- a/backend/src/app/storage.clj +++ b/backend/src/app/storage.clj @@ -181,14 +181,13 @@ ;; --- impl (defn resolve-backend - [{:keys [conn] :as storage} backend-id] - (us/assert some? conn) + [{:keys [conn pool] :as storage} backend-id] (let [backend (get-in storage [:backends backend-id])] (when-not backend (ex/raise :type :internal :code :backend-not-configured :hint (str/fmt "backend '%s' not configured" backend-id))) - (assoc backend :conn conn))) + (assoc backend :conn (or conn pool)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Garbage Collection Task