0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-25 07:58:49 -05:00

🐛 Fix wrong conn handling on some function on storage.

This commit is contained in:
Andrey Antukh 2021-01-08 12:37:32 +01:00
parent 151e36df0e
commit 0c30d53d95

View file

@ -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