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:
co-authored by
Jakob Borg
parent
0b5a08c99a
commit
5cf9168dc2
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user