mirror of
https://github.com/garethgeorge/backrest.git
synced 2025-12-12 08:45:38 +00:00
feat: support restic check operation (#303)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user