Skip to content

Commit

Permalink
drop deprecated Data.Pool.createPool
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelglass committed Oct 21, 2024
1 parent d4b9689 commit fbc8cda
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions nri-postgresql/src/Postgres/Connection.hs
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,15 @@ connectionIO settings = do
doAnything <- Platform.doAnythingHandler
pool <-
map Pool
<| Data.Pool.createPool
(pgConnect database `Exception.catch` handleError (toConnectionString database))
pgDisconnect
stripes
maxIdleTime
size
<| Data.Pool.newPool
( Data.Pool.defaultPoolConfig
(pgConnect database `Exception.catch` handleError (toConnectionString database))
pgDisconnect
(Prelude.realToFrac maxIdleTime)
(stripes * size)
|> Data.Pool.setNumStripes (Just stripes)
)

Prelude.pure
( Connection
doAnything
Expand Down

0 comments on commit fbc8cda

Please sign in to comment.