diff options
Diffstat (limited to 'app/services/ci/delete_unit_tests_service.rb')
-rw-r--r-- | app/services/ci/delete_unit_tests_service.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/services/ci/delete_unit_tests_service.rb b/app/services/ci/delete_unit_tests_service.rb index 230661a107d..a2fb44ff3fc 100644 --- a/app/services/ci/delete_unit_tests_service.rb +++ b/app/services/ci/delete_unit_tests_service.rb @@ -25,9 +25,7 @@ module Ci klass.transaction do ids = klass.deletable.lock('FOR UPDATE SKIP LOCKED').limit(BATCH_SIZE).pluck(:id) - break if ids.empty? - - deleted = klass.where(id: ids).delete_all + deleted = klass.where(id: ids).delete_all if ids.any? end deleted > 0 |