MCPcopy
hub / github.com/kopia/kopia / runMaintenanceTask

Method runMaintenanceTask

internal/server/server.go:998–1006  ·  view source on GitHub ↗
(ctx context.Context, dr repo.DirectRepository)

Source from the content-addressed store, hash-verified

996}
997
998func (s *Server) runMaintenanceTask(ctx context.Context, dr repo.DirectRepository) error {
999 return errors.Wrap(s.taskmgr.Run(ctx, "Maintenance", "Periodic maintenance", func(ctx context.Context, _ uitask.Controller) error {
1000 return repo.DirectWriteSession(ctx, dr, repo.WriteSessionOptions{
1001 Purpose: "periodicMaintenance",
1002 }, func(ctx context.Context, w repo.DirectRepositoryWriter) error {
1003 return snapshotmaintenance.Run(ctx, w, maintenance.ModeAuto, false, maintenance.SafetyFull)
1004 })
1005 }), "unable to run maintenance")
1006}
1007
1008// +checklocksread:s.serverMutex
1009func (s *Server) isLocal(src snapshot.SourceInfo) bool {

Callers

nothing calls this directly

Calls 3

DirectWriteSessionFunction · 0.92
RunFunction · 0.92
RunMethod · 0.65

Tested by

no test coverage detected