Skip to content

Commit

Permalink
fix: break loop in cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
yashmehrotra committed Jun 24, 2024
1 parent e05ef45 commit 705ee54
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions jobs/cleanup.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,7 @@ var CleanupConfigItems = &job.Job{
iter++
tx := ctx.Context.DB().Exec(configDeleteQuery, seconds, deleteBatchSize)
if tx.Error != nil {
ctx.Errorf("failed to delete config items: %v", tx.Error)
continue
return fmt.Errorf("failed to delete config items: %w", tx.Error)
}

if tx.RowsAffected == 0 {
Expand Down

0 comments on commit 705ee54

Please sign in to comment.