feat: support restic check operation (#303)

This commit is contained in:
Gareth
2024-05-27 10:26:18 -07:00
committed by GitHub
parent 5a51ae7c20
commit ce42f68d0d
43 changed files with 1807 additions and 989 deletions

View File

@@ -166,9 +166,15 @@ func (o *Orchestrator) ScheduleDefaultTasks(config *v1.Config) error {
for _, repo := range config.Repos {
// Schedule a prune task for the repo
t := tasks.NewPruneTask(repo.GetId(), tasks.PlanForSystemTasks, false)
if err := o.ScheduleTask(t, tasks.TaskPriorityDefault); err != nil {
if err := o.ScheduleTask(t, tasks.TaskPriorityPrune); err != nil {
return fmt.Errorf("schedule prune task for repo %q: %w", repo.GetId(), err)
}
// Schedule a check task for the repo
t = tasks.NewCheckTask(repo.GetId(), tasks.PlanForSystemTasks, false)
if err := o.ScheduleTask(t, tasks.TaskPriorityCheck); err != nil {
return fmt.Errorf("schedule check task for repo %q: %w", repo.GetId(), err)
}
}
return nil