(ctx context.Context, dr repo.DirectRepository)
| 996 | } |
| 997 | |
| 998 | func (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 |
| 1009 | func (s *Server) isLocal(src snapshot.SourceInfo) bool { |
nothing calls this directly
no test coverage detected