Change admin health endpoint to ready

This commit is contained in:
steve-chavez
2022-01-04 20:12:52 -05:00
committed by Steve Chavez
parent bba6e96fd3
commit 65a3ae08f0
5 changed files with 15 additions and 14 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ postgrestAdmin appState appConfig req respond = do
isMainAppReachable <- isRight <$> reachMainApp appConfig
case Wai.pathInfo req of
["health"] ->
["ready"] ->
if configDbChannelEnabled appConfig then do
listenerOn <- AppState.getIsListenerOn appState
respond $ Wai.responseLBS (if listenerOn && isMainAppReachable then HTTP.status200 else HTTP.status503) [] mempty