refactor: use AppState.releasePool everywhere

This prepares for wrapping the pool in a reference.
This commit is contained in:
Robert Vollmert
2022-08-02 09:24:14 +02:00
committed by Robert
parent eae169ca67
commit 421163dc75
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ dumpSchema appState = do
(toList configDbSchemas) (toList configDbSchemas)
configDbExtraSearchPath configDbExtraSearchPath
configDbPreparedStatements configDbPreparedStatements
SQL.release $ AppState.getPool appState AppState.releasePool appState
case result of case result of
Left e -> do Left e -> do
hPutStrLn stderr $ "An error ocurred when loading the schema cache:\n" <> show e hPutStrLn stderr $ "An error ocurred when loading the schema cache:\n" <> show e
+1 -1
View File
@@ -110,7 +110,7 @@ connectionWorker appState = do
connectionStatus :: AppState -> IO ConnectionStatus connectionStatus :: AppState -> IO ConnectionStatus
connectionStatus appState = connectionStatus appState =
retrying retrySettings shouldRetry $ retrying retrySettings shouldRetry $
const $ SQL.release pool >> getConnectionStatus const $ AppState.releasePool appState >> getConnectionStatus
where where
pool = AppState.getPool appState pool = AppState.getPool appState
retrySettings = capDelay delayMicroseconds $ exponentialBackoff backoffMicroseconds retrySettings = capDelay delayMicroseconds $ exponentialBackoff backoffMicroseconds