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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user