From 705ee54bfe4d947fc1257905c8d44526c3a07031 Mon Sep 17 00:00:00 2001 From: Yash Mehrotra Date: Mon, 24 Jun 2024 13:12:21 +0530 Subject: [PATCH] fix: break loop in cleanup --- jobs/cleanup.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/jobs/cleanup.go b/jobs/cleanup.go index de711eff..e3737217 100644 --- a/jobs/cleanup.go +++ b/jobs/cleanup.go @@ -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 {