feat(FN-4025): defer database integrity check and expose via health endpoin

Exposes database health status via the API by deferring integrity checks asynchronously, with docs and tests covering the core DB layer, store integration, and dashboard server health endpoint.

Fusion-Task-Id: FN-4025
This commit is contained in:
Fusion
2026-05-11 14:10:23 -07:00
committed by gsxdsm
parent 5c005023c4
commit e6e596ebb7
8 changed files with 142 additions and 51 deletions

View File

@@ -6948,6 +6948,18 @@ ${stepsSection}`;
return this.db;
}
getDatabaseHealth(): {
corruptionDetected: boolean;
integrityCheckPending: boolean;
integrityCheckLastRunAt: string | null;
} {
return {
corruptionDetected: this.db.corruptionDetected,
integrityCheckPending: this.db.integrityCheckPending,
integrityCheckLastRunAt: this.db.integrityCheckLastRunAt,
};
}
getDistributedTaskIdAllocator(): DistributedTaskIdAllocator {
if (!this.distributedTaskIdAllocator) {
this.distributedTaskIdAllocator = createDistributedTaskIdAllocator(this.db);