fix: do not log internal db errors like 'acquisition timeout' when log-level=crit

This commit is contained in:
Laurence Isla
2023-11-27 23:06:40 -05:00
committed by Steve Chavez
parent 33891e3a73
commit dfa875c8c7
7 changed files with 47 additions and 32 deletions
+1 -2
View File
@@ -38,7 +38,7 @@ admin appState appConfig req respond = do
isConnectionUp <-
if configDbChannelEnabled appConfig
then AppState.getIsListenerOn appState
else isRight <$> AppState.usePool appState (SQL.sql "SELECT 1")
else isRight <$> AppState.usePool appState appConfig (SQL.sql "SELECT 1")
case Wai.pathInfo req of
["ready"] ->
@@ -62,4 +62,3 @@ reachMainApp appSock = do
addrFamily (SockAddrInet _ _) = AF_INET
addrFamily (SockAddrInet6 {}) = AF_INET6
addrFamily (SockAddrUnix _) = AF_UNIX