Skip to content

Commit

Permalink
fix: improve prune and check scheduling in new repos
Browse files Browse the repository at this point in the history
  • Loading branch information
garethgeorge committed May 27, 2024
1 parent ba005ae commit c58055e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/orchestrator/tasks/taskcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (t *CheckTask) Next(now time.Time, runner TaskRunner) (ScheduledTask, error
}); err != nil {
return NeverScheduledTask, fmt.Errorf("finding last check run time: %w", err)
} else if !foundBackup {
return NeverScheduledTask, nil
lastRan = time.Now()
}

zap.L().Debug("last prune time", zap.Time("time", lastRan), zap.String("repo", t.RepoID()))
Expand Down
2 changes: 1 addition & 1 deletion internal/orchestrator/tasks/taskprune.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (t *PruneTask) Next(now time.Time, runner TaskRunner) (ScheduledTask, error
}); err != nil {
return NeverScheduledTask, fmt.Errorf("finding last prune run time: %w", err)
} else if !foundBackup {
return NeverScheduledTask, nil
lastRan = time.Now()
}

zap.L().Debug("last prune time", zap.Time("time", lastRan), zap.String("repo", t.RepoID()))
Expand Down

0 comments on commit c58055e

Please sign in to comment.