Monitor backup status in health check

GitOrigin-RevId: 1a90b2fcf85bfa5ec1e5aabcfe4183d406da95e6
This commit is contained in:
Andrew Rumble
2025-03-26 10:42:08 +00:00
committed by Copybot
parent 53444c1587
commit 47f2bed47c

View File

@@ -1,5 +1,10 @@
import config from 'config'
import { verifyProjectWithErrorContext } from '../storage/lib/backupVerifier.mjs'
import {
measureNeverBackedUpProjects,
measurePendingChangesBeforeTime,
} from './ProjectMetrics.mjs'
import { getEndDateForRPO, RPO } from './utils.mjs'
/** @type {Array<string>} */
const HEALTH_CHECK_PROJECTS = JSON.parse(config.get('healthCheckProjects'))
@@ -21,4 +26,7 @@ export async function healthCheck() {
for (const historyId of HEALTH_CHECK_PROJECTS) {
await verifyProjectWithErrorContext(historyId)
}
await measurePendingChangesBeforeTime(getEndDateForRPO())
await measureNeverBackedUpProjects(RPO)
}