Revert "misc: added health and ready probe endpoints"

This commit is contained in:
Sheen
2025-10-29 03:06:31 +08:00
committed by GitHub
parent e19daa51ad
commit ec9671c36c
10 changed files with 646 additions and 829 deletions
+1 -9
View File
@@ -12,7 +12,6 @@ type TArgs = {
auditLogDb?: Knex;
applicationDb: Knex;
logger: Logger;
onMigrationLockAcquired?: () => void;
};
const isProduction = process.env.NODE_ENV === "production";
@@ -31,7 +30,7 @@ const migrationStatusCheckErrorHandler = (err: Error) => {
throw err;
};
export const runMigrations = async ({ applicationDb, auditLogDb, logger, onMigrationLockAcquired }: TArgs) => {
export const runMigrations = async ({ applicationDb, auditLogDb, logger }: TArgs) => {
try {
// akhilmhdh(Feb 10 2025): 2 years from now remove this
if (isProduction) {
@@ -86,13 +85,6 @@ export const runMigrations = async ({ applicationDb, auditLogDb, logger, onMigra
await applicationDb.transaction(async (tx) => {
await tx.raw("SELECT pg_advisory_xact_lock(?)", [PgSqlLock.BootUpMigration]);
// Signal that this container is running migrations so that it can be marked as healthy/alive
// This is to prevent the container from being killed by the orchestrator
if (onMigrationLockAcquired) {
onMigrationLockAcquired();
}
logger.info("Running application migrations.");
const didPreviousInstanceRunMigration = !(await applicationDb.migrate