mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-18 09:00:35 +00:00
Revert "misc: added health and ready probe endpoints"
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user