Start using normal pool (instead of thread local) for db.

This commit is contained in:
Andrey Antukh 2020-01-23 17:51:32 +01:00
parent 3e8b570c6b
commit 82500ca079

View file

@ -15,8 +15,7 @@
[uxbox.core :refer [system]] [uxbox.core :refer [system]]
[uxbox.util.data :as data] [uxbox.util.data :as data]
[uxbox.util.pgsql :as pg] [uxbox.util.pgsql :as pg]
[vertx.core :as vx]) [vertx.core :as vx]))
(:import io.vertx.core.buffer.Buffer))
(defn- create-pool (defn- create-pool
[config system] [config system]
@ -28,7 +27,7 @@
(assoc :password password) (assoc :password password)
(str))] (str))]
(log/info "creating connection pool with" dburi) (log/info "creating connection pool with" dburi)
(pg/tl-pool dburi {:system system}))) (pg/pool dburi {:system system :max-size 8})))
(defstate pool (defstate pool
:start (create-pool cfg/config system)) :start (create-pool cfg/config system))