fix: Start listening after schema cache load
This change ensures PostgREST starts listening on a server socket only after it loaded the schema cache and is ready to handle requests. It is no longer going to return 503 errors during startup until the schema cache is loaded.
This commit is contained in:
committed by
Steve Chavez
parent
fae6253932
commit
8fa26ee865
@@ -128,7 +128,8 @@ data AppConfig = AppConfig
|
||||
, configAdminServerUnixSocketMode :: FileMode
|
||||
, configRoleSettings :: RoleSettings
|
||||
, configRoleIsoLvl :: RoleIsolationLvl
|
||||
, configInternalSCQuerySleep :: Maybe Int32
|
||||
, configInternalSCQuerySleepFst :: Maybe Int32
|
||||
, configInternalSCQuerySleepSnd :: Maybe Int32
|
||||
}
|
||||
|
||||
data LogLevel = LogCrit | LogError | LogWarn | LogInfo | LogDebug
|
||||
@@ -332,6 +333,7 @@ parser optPath env dbSettings roleSettings roleIsolationLvl =
|
||||
<*> parseSocketFileMode "admin-server-unix-socket-mode"
|
||||
<*> pure roleSettings
|
||||
<*> pure roleIsolationLvl
|
||||
<*> optInt "internal-schema-cache-query-sleep-before-queries"
|
||||
<*> optInt "internal-schema-cache-query-sleep"
|
||||
where
|
||||
parseErrorVerbosity :: C.Key -> C.Parser C.Config Verbosity
|
||||
|
||||
Reference in New Issue
Block a user