mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-25 02:00:10 +02:00
Monitor backup status in health check
GitOrigin-RevId: 1a90b2fcf85bfa5ec1e5aabcfe4183d406da95e6
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user