Add config option for pool timeout (#1280)

This commit is contained in:
Xavier Francisco
2019-04-25 12:23:20 -05:00
committed by Steve Chávez
parent 2044f77d49
commit d32f373e1e
4 changed files with 14 additions and 3 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ module Main where
import PostgREST.App (postgrest)
import PostgREST.Config (AppConfig (..),
import PostgREST.Config (AppConfig (..), configPoolTimeout',
prettyVersion, readOptions)
import PostgREST.DbStructure (getDbStructure, getPgVersion)
import PostgREST.Error (encodeError)
@@ -164,7 +164,7 @@ main = do
--
-- create connection pool with the provided settings, returns either
-- a 'Connection' or a 'ConnectionError'. Does not throw.
pool <- P.acquire (configPool conf, 10, pgSettings)
pool <- P.acquire (configPool conf, configPoolTimeout' conf, pgSettings)
--
-- To be filled in by connectionWorker
refDbStructure <- newIORef Nothing