chore(db): add ability to wait for programmatically started database maintenance, query last maintenance time (#10565)

Also adds a method to query the last database maintenance time.

Signed-off-by: Tommy van der Vorst <tommy@pixelspark.nl>
Co-authored-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
Tommy van der Vorst
2026-02-11 09:28:11 +00:00
committed by GitHub
co-authored by Jakob Borg
parent 0b5a08c99a
commit 5cf9168dc2
3 changed files with 33 additions and 9 deletions
+6 -1
View File
@@ -19,7 +19,12 @@ type DBService interface {
suture.Service
// Starts maintenance asynchronously, if not already running
StartMaintenance()
// Returns a channel that will receive the result when the requested maintenance finishes
StartMaintenance() <-chan error
// Returns the last time database maintenance completed
// This will return time zero when database maintenance has never completed successfully.
LastMaintenanceTime() time.Time
}
type DB interface {