mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-19 17:32:37 +00:00
misc: updated processes to run after db migration
This commit is contained in:
+13
-2
@@ -72,7 +72,7 @@ const run = async () => {
|
||||
const keyStore = keyStoreFactory(envConfig, keyValueStoreDAL);
|
||||
const redis = buildRedisFromConfig(envConfig);
|
||||
|
||||
const server = await main({
|
||||
const { server, completeServerInitialization } = await main({
|
||||
db,
|
||||
auditLogDb,
|
||||
superAdminDAL,
|
||||
@@ -140,7 +140,18 @@ const run = async () => {
|
||||
}
|
||||
});
|
||||
|
||||
logger.info("Migrations complete. Marking server as READY...");
|
||||
logger.info("Migrations complete. Completing server initialization...");
|
||||
|
||||
try {
|
||||
await completeServerInitialization();
|
||||
} catch (error) {
|
||||
logger.error(error, "Failed to complete server initialization");
|
||||
await server.close();
|
||||
await queue.shutdown();
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
logger.info("Server initialization complete. Marking server as READY...");
|
||||
|
||||
markServerReady();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user