chore(sqlite): allow periodic database maintenance to be disabled (#10441)
This change allows the periodic database maintenance to be disabled, while providing a way to programmatically start maintenance at a convenient moment. Signed-off-by: Tommy van der Vorst <tommy@pixelspark.nl>
This commit is contained in:
@@ -15,8 +15,17 @@ import (
|
||||
"github.com/thejerf/suture/v4"
|
||||
)
|
||||
|
||||
type DBService interface {
|
||||
suture.Service
|
||||
|
||||
// Starts maintenance asynchronously, if not already running
|
||||
StartMaintenance()
|
||||
}
|
||||
|
||||
type DB interface {
|
||||
Service(maintenanceInterval time.Duration) suture.Service
|
||||
// Create a service that performs database maintenance periodically (no
|
||||
// more often than the requested interval)
|
||||
Service(maintenanceInterval time.Duration) DBService
|
||||
|
||||
// Basics
|
||||
Update(folder string, device protocol.DeviceID, fs []protocol.FileInfo) error
|
||||
|
||||
Reference in New Issue
Block a user