graphql-engine/server/src-exec
Puru Gupta 2ca81b37e8 multitenant: fix dubious config status updates during tenant start
## Description ✍️
This PR fixes the config status update when the `Service configured successfully` message is written before the server is actually spawned. Now the status is updated only when the server is spawned successfully. To be specific, this change posts the status closer to where we log `starting API server`.

### Related Issues ✍
#2751

### Solution and Design ✍
We update the status inside `runHGEServer` function. This helps in adding the message only when the server is started. If any exception is thrown before the server is spawned, only that message is written to `config_status` table instead of the `Service configured successfully` message.

## Affected components ✍️

-  Server

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5179
Co-authored-by: Naveen Naidu <30195193+Naveenaidu@users.noreply.github.com>
Co-authored-by: Anon Ray <616387+ecthiender@users.noreply.github.com>
GitOrigin-RevId: 7860008403aa0645583e26915f620b66a5bbc531
2022-08-05 11:51:13 +00:00
..
Main.hs multitenant: fix dubious config status updates during tenant start 2022-08-05 11:51:13 +00:00